From c4624cad924a7719c024bfc735eccecc24f42995 Mon Sep 17 00:00:00 2001 From: Pierre Gode Date: Mon, 29 Apr 2019 13:41:28 +0200 Subject: [PATCH] small update --- ADconnection.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ADconnection.sh b/ADconnection.sh index 7f65d2c..f87108a 100755 --- a/ADconnection.sh +++ b/ADconnection.sh @@ -1459,6 +1459,8 @@ clear export HOSTNAME myhost=$( hostname | cut -d '.' -f1 ) DOMAIN=$(realm discover | grep -i realm.name | awk '{print $2}' | tr "[:upper:]" "[:lower:]") +if [ -z $1 ] +then if [ -d /home/"$DOMAIN" ] then ls /home/"$DOMAIN"/ | while read -r user @@ -1472,6 +1474,9 @@ echo "no user found on this system. try typing the user:" read -r user id "$user" | grep "$myhost" fi +else +id "$1" +fi exit }