From 8a3eedc6db3fe5e9063004e4675048b44ccc2922 Mon Sep 17 00:00:00 2001 From: PierreGoude Date: Tue, 28 Nov 2017 13:20:55 +0100 Subject: [PATCH] Update ADconnection.sh --- ADconnection.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ADconnection.sh b/ADconnection.sh index 55f97d0..1f66c98 100644 --- a/ADconnection.sh +++ b/ADconnection.sh @@ -478,6 +478,14 @@ eof debianclient(){ export HOSTNAME myhost=$( hostname ) +dkpg -l | grep sudo +if [ $? = 0 ] +then +"" +else +apt get install sudo -y +echo "administrator ALL=(ALL:ALL) ALL | tee -a /etc/sudoers.d/admin +fi clear sudo echo "${RED_TEXT}"Installing pakages do no abort!......."${INTRO_TEXT}" sudo apt-get update @@ -585,7 +593,6 @@ echo "" echo "Sudoersfile seems already to be modified, skipping..." echo "" else -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\ users ALL=(ALL:ALL) ALL" | sudo tee -a /etc/sudoers.d/sudoers sudo echo "%DOMAIN\ admins ALL=(ALL) ALL" | sudo tee -a /etc/sudoers.d/domain_admins