From 82ebba55953cb05b9fc58cf53fa2369a5aa05b14 Mon Sep 17 00:00:00 2001 From: PierreGode Date: Wed, 8 Aug 2018 13:16:21 +0200 Subject: [PATCH] Update ADconnection.sh --- ADconnection.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ADconnection.sh b/ADconnection.sh index 2c5c8de..3340a5b 100644 --- a/ADconnection.sh +++ b/ADconnection.sh @@ -865,7 +865,7 @@ fi ############################### Reauth ########################################## Reauthenticate(){ -whoelse=$( echo `whoami` ) +whoelse=$( who -ut | grep -v old | awk '{print $1}' ) homes=$( ls /home/tobii.intra/ ) if [ "$homes" = "$whoelse" ] then @@ -933,7 +933,7 @@ fi ########################################### Leave Realm ################################ leave(){ -whoelse=$( echo `whoami` ) +whoelse=$( who -ut | grep -v old | awk '{print $1}' ) homes=$( ls /home/tobii.intra/ ) if [ "$homes" = "$whoelse" ] then