mirror of
https://github.com/PierreGode/Linux-Active-Directory-join-script.git
synced 2025-12-21 08:50:12 +01:00
Fixed checks
This commit is contained in:
parent
93cde4f2b7
commit
bc8ce892a0
@ -205,7 +205,7 @@ else
|
||||
echo "Checking sudoers file.. ${RED_TEXT}FAIL${END}"
|
||||
fi
|
||||
grouPs=$(grep -i "$myhost" /etc/sudoers.d/sudoers | cut -d '%' -f2 | awk '{print $1}' | head -1)
|
||||
if [ grouPs = "$myhost""sudoers" ]
|
||||
if [ $grouPs = "$myhost""sudoers" ]
|
||||
then
|
||||
echo "Checking sudoers user groups.. ${INTRO_TEXT}OK${END}"
|
||||
else
|
||||
@ -409,7 +409,7 @@ else
|
||||
echo "Checking sudoers file.. FAIL"
|
||||
fi
|
||||
grouPs=$(grep -i "$myhost" /etc/sudoers.d/sudoers | cut -d '%' -f2 | awk '{print $1}' | head -1)
|
||||
if [ grouPs = "$myhost""sudoers" ]
|
||||
if [ $grouPs = "$myhost""sudoers" ]
|
||||
then
|
||||
echo "Checking sudoers user groups.. OK"
|
||||
else
|
||||
@ -776,7 +776,7 @@ else
|
||||
echo checking sudoers file.. "${RED_TEXT}FAIL not configured${END}"
|
||||
fi
|
||||
grouPs=$(grep -i "$myhost" /etc/sudoers.d/sudoers | cut -d '%' -f2 | cut -d '=' -f1 | sed -e 's/\<ALL\>//g')
|
||||
if [ grouPs = "$myhost""sudoers" ]
|
||||
if [ $grouPs = "$myhost""sudoers" ]
|
||||
then
|
||||
echo "Checking sudoers users.. ${INTRO_TEXT}OK${END}"
|
||||
else
|
||||
@ -1235,7 +1235,7 @@ if [ -f /etc/sudoers.d/admins ] < /dev/null > /dev/null 2>&1
|
||||
then
|
||||
echo "Checking sudoers file.. OK"
|
||||
grouPs=$(grep -i "$myhost" /etc/sudoers.d/admins | cut -d '%' -f2 | cut -d '=' -f1 | sed -e 's/\<ALL\>//g')
|
||||
if [ grouPs = "$myhost""sudoers" ]
|
||||
if [ $grouPs = "$myhost""sudoers" ]
|
||||
then
|
||||
echo "Checking sudoers users.. OK"
|
||||
else
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user