Update ADconnection.sh

This commit is contained in:
PierreGoude 2017-02-22 10:58:19 +01:00 committed by GitHub
parent 790ae11b65
commit 7d0c65be83

View File

@ -239,13 +239,8 @@ 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
echo "${INTRO_TEXT}Please not the it can take up to 5 minutes until AD sincronizes and you can log in..${INTRO_TEXT}"
echo "${INTRO_TEXT}If you sudoers grou in not hostname but a custom group pleace replace hostname with correct groupname in /et/sudoers.d/sudores${INTRO_TEXT}"
exec sudo -u root /bin/sh - <<eof
sed -i -e 's/fallback_homedir = \/home\/%u@%d/#fallback_homedir = \/home\/%u@%d/g' /etc/sssd/sssd.conf
sed -i -e 's/use_fully_qualified_names = True/use_fully_qualified_names = False/g' /etc/sssd/sssd.conf