From 18e0a61ad70054932d008c988a9dc15c6a7cb6da Mon Sep 17 00:00:00 2001 From: Pierre Gode Date: Thu, 4 Apr 2019 16:00:11 +0200 Subject: [PATCH] Fixed checks --- ADconnection.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ADconnection.sh b/ADconnection.sh index 93568c8..f7177cb 100755 --- a/ADconnection.sh +++ b/ADconnection.sh @@ -205,7 +205,7 @@ else echo "Checking sudoers file.. ${RED_TEXT}FAIL${END}" fi grouPs=$(grep -i "$myhost" /etc/sudoers.d/sudoers | cut -d '%' -f2 | awk '{print $1}' | head -1) -if [ "$grouPs" = "$myhost""sudoers" ] +if [ grouPs = "$myhost""sudoers" ] then echo "Checking sudoers user groups.. ${INTRO_TEXT}OK${END}" else @@ -409,7 +409,7 @@ else echo "Checking sudoers file.. FAIL" fi grouPs=$(grep -i "$myhost" /etc/sudoers.d/sudoers | cut -d '%' -f2 | awk '{print $1}' | head -1) -if [ "$grouPs" = "$myhost""sudoers" ] +if [ grouPs = "$myhost""sudoers" ] then echo "Checking sudoers user groups.. OK" else @@ -776,7 +776,7 @@ else echo checking sudoers file.. "${RED_TEXT}FAIL not configured${END}" fi grouPs=$(grep -i "$myhost" /etc/sudoers.d/sudoers | cut -d '%' -f2 | cut -d '=' -f1 | sed -e 's/\//g') -if [ "$grouPs" = "$myhost""sudoers" ] +if [ grouPs = "$myhost""sudoers" ] then echo "Checking sudoers users.. ${INTRO_TEXT}OK${END}" else @@ -1251,7 +1251,7 @@ if [ -f /etc/sudoers.d/admins ] < /dev/null > /dev/null 2>&1 then echo "Checking sudoers file.. OK" grouPs=$(grep -i "$myhost" /etc/sudoers.d/admins | cut -d '%' -f2 | cut -d '=' -f1 | sed -e 's/\//g') - if [ "$grouPs" = "$myhost""sudoers" ] + if [ grouPs = "$myhost""sudoers" ] then echo "Checking sudoers users.. OK" else