Update ADconnection.sh

This commit is contained in:
PierreGode 2019-02-20 12:26:50 +00:00 committed by GitHub
parent 44952da1d8
commit 2a26f806d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1078,7 +1078,7 @@ echo "hostname is $myhost"
echo "Looking for Realms.. please wait" echo "Looking for Realms.. please wait"
DOMAIN=$(realm discover | grep -i realm.name | awk '{print $2}') DOMAIN=$(realm discover | grep -i realm.name | awk '{print $2}')
ping -c 2 $DOMAIN >/dev/null ping -c 2 $DOMAIN >/dev/null
if [ "$?" -eq "0" ] if [ "$?" = "0" ]
then then
clear clear
echo "${NUMBER}I searched for an available domain and found ${MENU}>>> $DOMAIN <<<${END}${END}" echo "${NUMBER}I searched for an available domain and found ${MENU}>>> $DOMAIN <<<${END}${END}"
@ -1178,7 +1178,7 @@ if [ -f /etc/sudoers.d/sudoers ] < /dev/null > /dev/null 2>&1
then then
echo Checking sudoers file.. "${INTRO_TEXT}"OK"${END}" 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' | head -1) grouPs1=$(cat /etc/sudoers.d/sudoers | grep -i $myhost | cut -d '%' -f2 | cut -d '=' -f1 | sed -e 's/\<ALL\>//g' | head -1)
if [ $grouPs1 -eq "$myhost""sudoers" ] if [ "$grouPs1" = "$myhost""sudoers" ]
then then
echo Checking sudoers user groups.. "${INTRO_TEXT}"OK"${END}" echo Checking sudoers user groups.. "${INTRO_TEXT}"OK"${END}"
else else