Update ADconnection.sh

This commit is contained in:
PierreGode 2018-03-27 11:31:21 +02:00 committed by GitHub
parent f097244ddf
commit 33cb939bad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -198,6 +198,13 @@ echo Checking PAM auth configuration.. "${RED_TEXT}"FAIL"${END}"
fi fi
fi fi
realm discover $DOMAIN realm discover $DOMAIN
if [ "$therealm" = no ]
then
echo "${RED_TEXT}"Join has Failed"${END}"
else
lastverify=$( realm discover $DOMAIN | grep -m 1 $DOMAIN )
echo "${INTRO_TEXT}"joined to $ lastverify"${END}"
fi
echo "${INTRO_TEXT}Please reboot your machine and wait 3 min for Active Directory to sync before login${INTRO_TEXT}" echo "${INTRO_TEXT}Please reboot your machine and wait 3 min for Active Directory to sync before login${INTRO_TEXT}"
exit exit
fi fi