Update ADconnection.sh

This commit is contained in:
PierreGoude 2016-12-13 09:41:45 +01:00 committed by GitHub
parent a3c66588be
commit f4b6142d26

View File

@ -68,7 +68,6 @@ sudo echo "$NetBios"'\\'"domain^admins ALL=(ALL:ALL) ALL" >> /etc/sudoers
sudo echo "$NetBios"'\\'"$myhost""sudoers ALL=(ALL:ALL) ALL" >> /etc/sudoers sudo echo "$NetBios"'\\'"$myhost""sudoers ALL=(ALL:ALL) ALL" >> /etc/sudoers
sudo echo "$UseR"" ALL=(ALL:ALL) ALL" >> /etc/sudoers sudo echo "$UseR"" ALL=(ALL:ALL) ALL" >> /etc/sudoers
sudo echo "%DOMAIN\ admins@$DOMAIN ALL=(ALL) ALL" >> /etc/sudoers.d/domain_admins sudo echo "%DOMAIN\ admins@$DOMAIN ALL=(ALL) ALL" >> /etc/sudoers.d/domain_admins
while true; do while true; do
read -p '$myhost is added to sudoers group, would you like to let additional group to have access (y/n)?' yn read -p '$myhost is added to sudoers group, would you like to let additional group to have access (y/n)?' yn
case $yn in case $yn in
@ -77,7 +76,7 @@ while true; do
sudo echo "$NetBios"'\'"$Group" >> /etc/ssh/login.group.allowed sudo echo "$NetBios"'\'"$Group" >> /etc/ssh/login.group.allowed
sudo echo "%$NetBios"'\\'"$Group"" ALL=(ALL:ALL) ALL" >> /etc/sudoers sudo echo "%$NetBios"'\\'"$Group"" ALL=(ALL:ALL) ALL" >> /etc/sudoers
echo "$Group has been added and will have access" echo "$Group has been added and will have access"
break;; ;;
[Nn]* ) echo "plese remember to reboot" [Nn]* ) echo "plese remember to reboot"
sleep 1 sleep 1
exit ;; exit ;;