Update ADconnection.sh

This commit is contained in:
PierreGoude 2017-02-06 09:36:10 +01:00 committed by GitHub
parent ff43c50b63
commit 551a2b9066

View File

@ -107,7 +107,7 @@ echo checking sudoers file.. "${RED_TEXT}"FAIL"${END}"
echo Checking sudoers users.. "${RED_TEXT}"FAIL"${END}" echo Checking sudoers users.. "${RED_TEXT}"FAIL"${END}"
fi fi
guest=$(cat /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf | grep -i allow-guest | grep -i false | cut -d '=' -f2) guest=$(cat /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf | grep -i allow-guest | grep -i false | cut -d '=' -f2)
if [ $guest = false ] if [ "$guest" = false ]
then then
echo Checking login configuration.. "${INTRO_TEXT}"OK"${END}" echo Checking login configuration.. "${INTRO_TEXT}"OK"${END}"
else else
@ -182,7 +182,7 @@ echo checking sudoers file.. "${RED_TEXT}"FAIL"${END}"
echo Checking sudoers users.. "${RED_TEXT}"FAIL"${END}" echo Checking sudoers users.. "${RED_TEXT}"FAIL"${END}"
fi fi
guest=$(cat /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf | grep -i allow-guest | grep -i false | cut -d '=' -f2) guest=$(cat /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf | grep -i allow-guest | grep -i false | cut -d '=' -f2)
if [ $guest = false ] if [ "$guest" = false ]
then then
echo Checking login configuration.. "${INTRO_TEXT}"OK"${END}" echo Checking login configuration.. "${INTRO_TEXT}"OK"${END}"
else else
@ -328,8 +328,22 @@ else
echo checking sudoers file.. "${RED_TEXT}"FAIL"${END}" echo checking sudoers file.. "${RED_TEXT}"FAIL"${END}"
echo Checking sudoers users.. "${RED_TEXT}"FAIL"${END}" echo Checking sudoers users.. "${RED_TEXT}"FAIL"${END}"
fi fi
homedir=$(cat /etc/pam.d/common-session | grep homedir | grep 0022 | cut -d '=' -f3)
if [ "$homedir" = 0022 ]
then
echo Checking PAM configuration.. "${INTRO_TEXT}"OK"${END}"
else
echo Checking PAM configuration.. "${RED_TEXT}"FAIL"${END}"
fi
cauth=$(cat /etc/pam.d/common-auth | grep required | grep onerr | grep allow | cut -d '=' -f4 | cut -d 'f' -f1)
if [ "$cauth" = allow ]
then
echo Checking PAM auth configuration.. "${INTRO_TEXT}"OK"${END}"
else
echo Checking PAM auth configuration.. "${RED_TEXT}"FAIL"${END}"
fi
guest=$(cat /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf | grep -i allow-guest | grep -i false | cut -d '=' -f2) guest=$(cat /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf | grep -i allow-guest | grep -i false | cut -d '=' -f2)
if [ $guest = false ] if [ "$guest" = false ]
then then
echo Checking login configuration.. "${INTRO_TEXT}"OK"${END}" echo Checking login configuration.. "${INTRO_TEXT}"OK"${END}"
else else