diff --git a/domainjoin.sh b/domainjoin.sh new file mode 100644 index 0000000..fe97ffc --- /dev/null +++ b/domainjoin.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +wget -O - http://repo.pbis.beyondtrust.com/apt/RPM-GPG-KEY-pbis|sudo apt-key add - +wget -O /etc/apt/sources.list.d/pbiso.list http://repo.pbis.beyondtrust.com/apt/pbiso.list +apt update + +apt install -y pbis-open + +# sudo wget -O /etc/yum.repos.d/pbiso.repo http://repo.pbis.beyondtrust.com/yum/pbiso.repo + +# yum install pbis-open + +domainjoin-cli join home.johnhgaunt.com jgaunt + +# Enter password here + +/opt/pbis/bin/config UserDomainPrefix GAUNT +/opt/pbis/bin/config AssumeDefaultDomain true +/opt/pbis/bin/config LoginShellTemplate /bin/bash +/opt/pbis/bin/config HomeDirTemplate %H/%U + +echo "## ad.johnhgaunt.com Admins ##" >> /etc/sudoers.d/GauntAD +echo "# Allow members of Gaunt\Domain Admins group sudo access" >> /etc/sudoers.d/GauntAD +echo "%Domain^Admins ALL=(ALL:ALL) ALL" >> /etc/sudoers.d/GauntAD + +reboot \ No newline at end of file