From 6e61f7acaf78d06f23d91d4c855d60ab6b6abb9f Mon Sep 17 00:00:00 2001 From: PierreGoude Date: Tue, 13 Dec 2016 09:53:54 +0100 Subject: [PATCH] Update ADconnection.sh --- ADconnection.sh | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/ADconnection.sh b/ADconnection.sh index 6d1189f..fb7f2e3 100644 --- a/ADconnection.sh +++ b/ADconnection.sh @@ -68,21 +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 "$UseR"" ALL=(ALL:ALL) ALL" >> /etc/sudoers sudo echo "%DOMAIN\ admins@$DOMAIN ALL=(ALL) ALL" >> /etc/sudoers.d/domain_admins -while true; do - read -p '$myhost is added to sudoers group, would you like to let additional group to have access (y/n)?' yn - case $yn in - [Yy]* ) echo "type domain group" - read Group - sudo echo "$NetBios"'\'"$Group" >> /etc/ssh/login.group.allowed - sudo echo "%$NetBios"'\\'"$Group"" ALL=(ALL:ALL) ALL" >> /etc/sudoers - echo "$Group has been added and will have access" - ;; - [Nn]* ) echo "plese remember to reboot" - sleep 1 - ;; - * ) echo 'Please answer yes or no.';; - esac -done echo "Check that the group is correct" echo "in Sudoers file..." sudo cat /etc/sudoers | grep $myhost