mirror of
https://github.com/PierreGode/Linux-Active-Directory-join-script.git
synced 2025-12-21 16:50:13 +01:00
Update ADconnection.sh
This commit is contained in:
parent
8a00eaf1af
commit
c0d1ac0d40
@ -180,9 +180,6 @@ fi
|
|||||||
if [ -f /etc/sudoers.d/admins ]
|
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
|
|
||||||
echo checking sudoers file.. "${RED_TEXT}"FAIL"${END}"
|
|
||||||
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/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
|
||||||
@ -190,6 +187,21 @@ echo Checking sudoers users.. "${INTRO_TEXT}"OK"${END}"
|
|||||||
else
|
else
|
||||||
echo Checking sudoers users.. "${RED_TEXT}"FAIL"${END}"
|
echo Checking sudoers users.. "${RED_TEXT}"FAIL"${END}"
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
if [ -f /etc/sudoers.d/sudoers ]
|
||||||
|
then
|
||||||
|
echo Checking sudoers file.. "${INTRO_TEXT}"OK"${END}"
|
||||||
|
grouPs1=$(cat /etc/sudoers.d/sudoers | grep -i $myhost | cut -d '%' -f2 | cut -d '=' -f1 | sed -e 's/\<ALL\>//g')
|
||||||
|
if [ $grouPs1 = "$myhost""sudoers" ]
|
||||||
|
then
|
||||||
|
echo Checking sudoers users.. "${INTRO_TEXT}"OK"${END}"
|
||||||
|
else
|
||||||
|
echo Checking sudoers users.. "${RED_TEXT}"FAIL"${END}"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo Checking sudoers users.. "${RED_TEXT}"FAIL"${END}"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
homedir=$(cat /etc/pam.d/common-session | grep homedir | grep 0022 | cut -d '=' -f3)
|
homedir=$(cat /etc/pam.d/common-session | grep homedir | grep 0022 | cut -d '=' -f3)
|
||||||
if [ $homedir = 0022 ]
|
if [ $homedir = 0022 ]
|
||||||
then
|
then
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user