Update ADconnection.sh

This commit is contained in:
PierreGoude 2017-02-07 15:00:11 +01:00 committed by GitHub
parent 96dc7d8779
commit 8a00eaf1af

View File

@ -99,13 +99,13 @@ echo Realm configured?.. "${RED_TEXT}"FAIL"${END}"
else else
echo Realm configured?.. "${INTRO_TEXT}"OK"${END}" echo Realm configured?.. "${INTRO_TEXT}"OK"${END}"
fi fi
if [ -f /etc/sudoers.d/admins ] if [ -f /etc/sudoers.d/sudoers ]
then then
echo Checking sudoers file.. "${INTRO_TEXT}"OK"${END}" echo Checking sudoers file.. "${INTRO_TEXT}"OK"${END}"
else else
echo checking sudoers file.. "${RED_TEXT}"FAIL"${END}" echo checking sudoers file.. "${RED_TEXT}"FAIL"${END}"
fi fi
grouPs=$(cat /etc/sudoers.d/admins | grep -i $myhost | cut -d '%' -f2 | cut -d '=' -f1 | sed -e 's/\<ALL\>//g') grouPs=$(cat /etc/sudoers.d/sudoers | grep -i $myhost | cut -d '%' -f2 | cut -d '=' -f1 | sed -e 's/\<ALL\>//g')
if [ $grouPs = "$myhost""sudoers" ] if [ $grouPs = "$myhost""sudoers" ]
then then
echo Checking sudoers users.. "${INTRO_TEXT}"OK"${END}" echo Checking sudoers users.. "${INTRO_TEXT}"OK"${END}"