diff --git a/ADconnection.sh b/ADconnection.sh index c2ff0f1..137224b 100644 --- a/ADconnection.sh +++ b/ADconnection.sh @@ -198,6 +198,13 @@ echo Checking PAM auth configuration.. "${RED_TEXT}"FAIL"${END}" fi fi 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}" exit fi