From 50c80a2fe6174ac0cfe8e20e466456f3e44cefaa Mon Sep 17 00:00:00 2001 From: Pierre Gode Date: Tue, 2 Apr 2019 13:21:49 +0200 Subject: [PATCH] improved detecting fails and errors. --- ADconnection.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ADconnection.sh b/ADconnection.sh index b86b2d1..7334fe9 100755 --- a/ADconnection.sh +++ b/ADconnection.sh @@ -1151,7 +1151,7 @@ read -r DOMAIN else echo "" fi -therealm=$( realm discover | grep -i realm-name | awk '{print $2}') +therealm=$( realm discover | grep -i configured | awk '{print $2}') if [ "$therealm" = "no" ] then echo Realm configured?.. "${RED_TEXT}FAIL${END}" @@ -1161,7 +1161,7 @@ fi if [ -f /etc/sudoers.d/admins ] < /dev/null > /dev/null 2>&1 then echo Checking sudoers file.. "${INTRO_TEXT}OK${END}" -grouPs=$(grep -i "$myhost" /etc/sudoers.d/admins | cut -d '%' -f2 | cut -d '=' -f1 | sed -e 's/\//g') +grouPs=$(grep -i "$myhost" /etc/sudoers.d/sudoers | cut -d '%' -f2 | cut -d '=' -f1 | sed -e 's/\//g') if [ $grouPs = "$myhost""sudoers" ] then echo Checking sudoers users.. "${INTRO_TEXT}OK${END}"