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
5f56c36d87
commit
4cbebbf4af
@ -176,9 +176,9 @@ fi
|
|||||||
grouPs=$(cat /etc/sudoers.d/sudoers | grep -i "$myhost" | cut -d '%' -f2 | awk '{print $1}')
|
grouPs=$(cat /etc/sudoers.d/sudoers | grep -i "$myhost" | cut -d '%' -f2 | awk '{print $1}')
|
||||||
if [ "$grouPs" = "$myhost""sudoers" ]
|
if [ "$grouPs" = "$myhost""sudoers" ]
|
||||||
then
|
then
|
||||||
echo Checking sudoers users.. "${INTRO_TEXT}"OK"${END}"
|
echo Checking sudoers user groups.. "${INTRO_TEXT}"OK"${END}"
|
||||||
else
|
else
|
||||||
echo Checking sudoers users.. "${RED_TEXT}"FAIL"${END}"
|
echo Checking sudoers user groups.. "${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 ] < /dev/null > /dev/null 2>&1
|
if [ $homedir = 0022 ] < /dev/null > /dev/null 2>&1
|
||||||
@ -358,9 +358,9 @@ fi
|
|||||||
grouPs=$(cat /etc/sudoers.d/sudoers | grep -i "$myhost" | cut -d '%' -f2 | awk '{print $1}')
|
grouPs=$(cat /etc/sudoers.d/sudoers | grep -i "$myhost" | cut -d '%' -f2 | awk '{print $1}')
|
||||||
if [ "$grouPs" = "$myhost""sudoers" ]
|
if [ "$grouPs" = "$myhost""sudoers" ]
|
||||||
then
|
then
|
||||||
echo "Checking sudoers users.. OK"
|
echo "Checking sudoers user groups.. OK"
|
||||||
else
|
else
|
||||||
echo "Checking sudoers users.. FAIL"
|
echo "Checking sudoers user groups.. FAIL"
|
||||||
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 ] < /dev/null > /dev/null 2>&1
|
if [ $homedir = 0022 ] < /dev/null > /dev/null 2>&1
|
||||||
@ -1122,9 +1122,9 @@ 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')
|
grouPs1=$(cat /etc/sudoers.d/sudoers | grep -i $myhost | cut -d '%' -f2 | cut -d '=' -f1 | sed -e 's/\<ALL\>//g')
|
||||||
if [ $grouPs1 = "$myhost""sudoers" ]
|
if [ $grouPs1 = "$myhost""sudoers" ]
|
||||||
then
|
then
|
||||||
echo Checking sudoers users.. "${INTRO_TEXT}"OK"${END}"
|
echo Checking sudoers user groups.. "${INTRO_TEXT}"OK"${END}"
|
||||||
else
|
else
|
||||||
echo Checking sudoers users.. "${RED_TEXT}"FAIL"${END}"
|
echo Checking sudoers user groups.. "${RED_TEXT}"FAIL"${END}"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo Checking sudoers file.. "${RED_TEXT}"FAIL not configured"${END}"
|
echo Checking sudoers file.. "${RED_TEXT}"FAIL not configured"${END}"
|
||||||
@ -1188,9 +1188,9 @@ echo "Checking sudoers file.. OK"
|
|||||||
grouPs1=$(cat /etc/sudoers.d/sudoers | grep -i $myhost | cut -d '%' -f2 | cut -d '=' -f1 | sed -e 's/\<ALL\>//g')
|
grouPs1=$(cat /etc/sudoers.d/sudoers | grep -i $myhost | cut -d '%' -f2 | cut -d '=' -f1 | sed -e 's/\<ALL\>//g')
|
||||||
if [ $grouPs1 = "$myhost""sudoers" ]
|
if [ $grouPs1 = "$myhost""sudoers" ]
|
||||||
then
|
then
|
||||||
echo "Checking sudoers users.. OK"
|
echo "Checking sudoers user groups.. OK"
|
||||||
else
|
else
|
||||||
echo "Checking sudoers users.. FAIL"
|
echo "Checking sudoers user groups.. FAIL"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "Checking sudoers file.. FAIL not configured"
|
echo "Checking sudoers file.. FAIL not configured"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user