From 5a96b32f7f6a4df147c64926bbdf42fab1620641 Mon Sep 17 00:00:00 2001 From: PierreGode Date: Fri, 9 Nov 2018 09:55:18 +0100 Subject: [PATCH] Update ADconnection.sh --- ADconnection.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/ADconnection.sh b/ADconnection.sh index ac55b76..722a745 100644 --- a/ADconnection.sh +++ b/ADconnection.sh @@ -98,20 +98,23 @@ sudo echo "%DOMAIN\ admins ALL=(ALL) NOPASSWD:ALL" | sudo tee -a /etc/sudoers.d/ #sudo realm permit --groups "$myhost""sudoers" ;; - [Nn]* ) sudo echo "administrator ALL=(ALL:ALL) ALL" | sudo tee -a /etc/sudoers.d/sudoers + [Nn]* ) +sudo echo "administrator ALL=(ALL:ALL) ALL" | sudo tee -a /etc/sudoers.d/sudoers sudo echo "%$myhost""sudoers ALL=(ALL:ALL) ALL" | sudo tee -a /etc/sudoers.d/sudoers sudo echo "%DOMAIN\ admins ALL=(ALL:ALL) ALL" | sudo tee -a /etc/sudoers.d/domain_admins #sudo realm permit --groups "$myhost""sudoers" ;; * ) echo "Please answer yes or no.";; esac -fi;; +fi +;; [Nn]* ) echo "Disabled sudo rights for users on this machine" echo "" echo "" states=$( echo 12 );; - * ) echo 'Please answer yes or no.';; - esac + * ) echo "Please answer yes or no." + ;; + esac homedir=$( cat /etc/pam.d/common-session | grep homedir | grep 0022 | cut -d '=' -f3 ) if [ $homedir = 0022 ] then