Update domainjoin.sh
This commit is contained in:
@@ -17,17 +17,17 @@ fi
|
|||||||
read -e -p "Enter Domain name: " -i "home.johnhgaunt.com" domain
|
read -e -p "Enter Domain name: " -i "home.johnhgaunt.com" domain
|
||||||
read -e -p "Enter netBIOS name: " -i "GAUNT" netbiosname
|
read -e -p "Enter netBIOS name: " -i "GAUNT" netbiosname
|
||||||
read -e -p "Enter Domain Admin username: " -i "jgaunt" username
|
read -e -p "Enter Domain Admin username: " -i "jgaunt" username
|
||||||
read -s -p "Enter Password: " password
|
read -e -s -p "Enter Password: " password
|
||||||
|
|
||||||
domainjoin-cli join $domain $username $password
|
domainjoin-cli join ${domain} ${username} ${password}
|
||||||
|
|
||||||
/opt/pbis/bin/config UserDomainPrefix $netbiosname
|
/opt/pbis/bin/config UserDomainPrefix ${netbiosname}
|
||||||
/opt/pbis/bin/config AssumeDefaultDomain true
|
/opt/pbis/bin/config AssumeDefaultDomain true
|
||||||
/opt/pbis/bin/config LoginShellTemplate /bin/bash
|
/opt/pbis/bin/config LoginShellTemplate /bin/bash
|
||||||
/opt/pbis/bin/config HomeDirTemplate %H/%U
|
/opt/pbis/bin/config HomeDirTemplate %H/%U
|
||||||
|
|
||||||
echo "## $domain Admins ##" >> /etc/sudoers.d/$netbiosnameAD
|
echo "## ${domain} Admins ##" >> /etc/sudoers.d/${netbiosname}AD
|
||||||
echo "# Allow members of $netbiosname\Domain Admins group sudo access" >> /etc/sudoers.d/$netbiosnameAD
|
echo "# Allow members of ${netbiosname}\Domain Admins group sudo access" >> /etc/sudoers.d/${netbiosname}AD
|
||||||
echo "%Domain^Admins ALL=(ALL:ALL) ALL" >> /etc/sudoers.d/$netbiosnameAD
|
echo "%Domain^Admins ALL=(ALL:ALL) ALL" >> /etc/sudoers.d/${netbiosname}AD
|
||||||
|
|
||||||
reboot
|
reboot
|
||||||
|
|||||||
Reference in New Issue
Block a user