mirror of
https://github.com/PierreGode/Linux-Active-Directory-join-script.git
synced 2025-12-21 08:50:12 +01:00
Update ADconnection.sh
This commit is contained in:
parent
7e422184f4
commit
c7168db413
@ -179,13 +179,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/sudoers ]
|
if [ -f /etc/sudoers.d/admins ]
|
||||||
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/sudoers | grep -i $myhost | cut -d '%' -f2 | cut -d '=' -f1 | sed -e 's/\<ALL\>//g')
|
grouPs=$(cat /etc/sudoers.d/admins | 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}"
|
||||||
@ -206,13 +206,6 @@ echo Checking PAM auth configuration.. "${INTRO_TEXT}"OK"${END}"
|
|||||||
else
|
else
|
||||||
echo Checking PAM auth configuration.. "${RED_TEXT}"FAIL"${END}"
|
echo Checking PAM auth configuration.. "${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)
|
|
||||||
if [ "$guest" = false ]
|
|
||||||
then
|
|
||||||
echo Checking login configuration.. "${INTRO_TEXT}"OK"${END}"
|
|
||||||
else
|
|
||||||
echo Checking login configuration.. "${RED_TEXT}"FAIL"${END}"
|
|
||||||
fi
|
|
||||||
echo "If this is wrong DO NOT REBOOT and contact sysadmin"
|
echo "If this is wrong DO NOT REBOOT and contact sysadmin"
|
||||||
exec sudo -u root /bin/sh - <<eof
|
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/fallback_homedir = \/home\/%u@%d/#fallback_homedir = \/home\/%u@%d/g' /etc/sssd/sssd.conf
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user