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
fa78bf1526
commit
cbf6057151
@ -1288,7 +1288,11 @@ sudo apt-get install ldap-utils -y
|
|||||||
echo "${NUMBER}please edit in ldap.conf the lines BASE and URI ${END}"
|
echo "${NUMBER}please edit in ldap.conf the lines BASE and URI ${END}"
|
||||||
sleep 3
|
sleep 3
|
||||||
sudo nano /etc/ldap/ldap.conf
|
sudo nano /etc/ldap/ldap.conf
|
||||||
sudo ldapsearch | grep -i "$myhost"
|
if ! sudo ldapsearch | grep -i "$myhost"
|
||||||
|
then
|
||||||
|
echo "Something went wrong. please check your configuration"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@ -1778,4 +1782,4 @@ fi_auth
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
PRECHECK_FN
|
PRECHECK_FN
|
||||||
@ -1,8 +0,0 @@
|
|||||||
echo Checking sudoers file.. "${INTRO_TEXT}OK${END}"
|
|
||||||
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}"
|
|
||||||
else
|
|
||||||
echo Checking sudoers users.. "${RED_TEXT}FAIL${END}"
|
|
||||||
fi
|
|
||||||
Loading…
x
Reference in New Issue
Block a user