From 86baa261e6aae38a8fe407287dea7205a3245d22 Mon Sep 17 00:00:00 2001 From: PierreGode <8579922+PierreGode@users.noreply.github.com> Date: Mon, 13 Jul 2020 08:17:44 +0200 Subject: [PATCH] Update ADconnection.sh --- ADconnection.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ADconnection.sh b/ADconnection.sh index ce344c9..3a8bed2 100755 --- a/ADconnection.sh +++ b/ADconnection.sh @@ -872,6 +872,8 @@ echo "${INTRO_TEXT}Detecting Ubuntu $var${END}" sudo echo "${INTRO_TEXT}Realm=$DOMAIN${END}" echo "${INTRO_TEXT}Joining Ubuntu $var${END}" echo "" +if [ -z readfile ] +then admin=$( sudo grep ADADMIN readfile | awk '{print $3}' ) if [ "$admin" = "null" ] then @@ -881,6 +883,10 @@ read -r ADMIN else ADMIN=$( echo $admin ) fi +else +echo "${INTRO_TEXT}Please type Admin user:${END}" +read -r ADMIN +fi encrypt=$( sudo grep ENCRYPTEDPASSWD readfile | awk '{print $3}' ) if [ "$encrypt" = "null" ] || [ "$encrypt" = "no" ] then