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