From c01874fb7816977ad8bede8a03e02752661e94d9 Mon Sep 17 00:00:00 2001 From: PierreGoude Date: Mon, 20 Feb 2017 16:28:01 +0100 Subject: [PATCH] Update ADconnection.sh --- ADconnection.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/ADconnection.sh b/ADconnection.sh index 1116ea3..dc9b17c 100644 --- a/ADconnection.sh +++ b/ADconnection.sh @@ -482,9 +482,15 @@ exit ############################### Reauth ########################################## Reauthenticate14(){ -echo "Reauth for Realmd ubuntu 14 only!" -echo "Type domain" -read -r DOMAIN +DOMAIN=$(realm discover | grep -i realm.name | cut -d ':' -f2 | sed -e 's/^[[:space:]]*//') +read -p "Do you wish to use it (y/n)?" yn + case $yn in + [Yy]* ) echo "${INTRO_TEXT}"Please log in with domain admin to $DOMAIN to connect"${END}";; + + [Nn]* ) echo "Please enter the domain you wish to join:" + read -r DOMAIN;; + * ) echo 'Please answer yes or no.';; + esac echo "Type Adminuser" read -r ADMIN discover=$(realm discover | grep domain-name: | cut -d ':' -f2)