mirror of
https://github.com/PierreGode/Linux-Active-Directory-join-script.git
synced 2025-12-21 08:50:12 +01:00
improved detecting fails and errors.
This commit is contained in:
parent
60063f372b
commit
50c80a2fe6
@ -1151,7 +1151,7 @@ read -r DOMAIN
|
||||
else
|
||||
echo ""
|
||||
fi
|
||||
therealm=$( realm discover | grep -i realm-name | awk '{print $2}')
|
||||
therealm=$( realm discover | grep -i configured | awk '{print $2}')
|
||||
if [ "$therealm" = "no" ]
|
||||
then
|
||||
echo Realm configured?.. "${RED_TEXT}FAIL${END}"
|
||||
@ -1161,7 +1161,7 @@ fi
|
||||
if [ -f /etc/sudoers.d/admins ] < /dev/null > /dev/null 2>&1
|
||||
then
|
||||
echo Checking sudoers file.. "${INTRO_TEXT}OK${END}"
|
||||
grouPs=$(grep -i "$myhost" /etc/sudoers.d/admins | cut -d '%' -f2 | cut -d '=' -f1 | sed -e 's/\<ALL\>//g')
|
||||
grouPs=$(grep -i "$myhost" /etc/sudoers.d/sudoers | cut -d '%' -f2 | cut -d '=' -f1 | sed -e 's/\<ALL\>//g')
|
||||
if [ $grouPs = "$myhost""sudoers" ]
|
||||
then
|
||||
echo Checking sudoers users.. "${INTRO_TEXT}OK${END}"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user