Update ADconnection.sh

This commit is contained in:
PierreGoude 2017-11-28 13:20:55 +01:00 committed by GitHub
parent 44fd6bfe61
commit 8a3eedc6db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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