From 9e27da9a4be394c8e89f960df6d02e233abe559d Mon Sep 17 00:00:00 2001 From: PierreGoude Date: Wed, 28 Jun 2017 10:38:49 +0200 Subject: [PATCH] Update ADconnection.sh --- ADconnection.sh | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/ADconnection.sh b/ADconnection.sh index 94a0bf6..9902e9b 100644 --- a/ADconnection.sh +++ b/ADconnection.sh @@ -186,8 +186,13 @@ echo "session required pam_mkhomedir.so skel=/etc/skel/ umask=0022" | sudo tee - fi sudo sh -c "echo 'greeter-show-manual-login=true' | sudo tee -a /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf" sudo sh -c "echo 'allow-guest=false' | sudo tee -a /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf" +## temp test #### +echo "" +echo $states +echo "" +sleep 5 + -checkthis(){ therealm=$(realm discover $DOMAIN | grep -i configured: | cut -d ':' -f2 | sed -e 's/^[[:space:]]*//') if [ $therealm = no ] then @@ -195,16 +200,16 @@ echo Realm configured?.. "${RED_TEXT}"FAIL"${END}" else echo Realm configured?.. "${INTRO_TEXT}"OK"${END}" fi +if [ $states = 12 ] +then +echo "Sudoers not configured... skipping" +else if [ -f /etc/sudoers.d/sudoers ] then echo Checking sudoers file.. "${INTRO_TEXT}"OK"${END}" else echo checking sudoers file.. "${RED_TEXT}"FAIL"${END}" fi -if [ $states =12 ] -then -echo "Sudoers not configured... skipping" -else grouPs=$(cat /etc/sudoers.d/sudoers | grep -i $myhost | cut -d '%' -f2 | cut -d '=' -f1 | sed -e 's/\//g') if [ $grouPs = "$myhost""sudoers" ] then @@ -249,8 +254,6 @@ echo "${INTRO_TEXT}Please reboot your machine and wait 3 min for Active Director eof exit } -checkthis -} ####################### Setup for Ubuntu server ####################################### ubuntuserver14(){