mirror of
https://github.com/PierreGode/Linux-Active-Directory-join-script.git
synced 2025-12-21 16:50:13 +01:00
improved detecting fails and errors.
This commit is contained in:
parent
ec423eb73f
commit
55607797ed
@ -1278,14 +1278,14 @@ sleep 3
|
|||||||
if [ "$ldaptools" = dap-uti ]
|
if [ "$ldaptools" = dap-uti ]
|
||||||
then
|
then
|
||||||
echo "ldap tool installed.. trying to find this host"
|
echo "ldap tool installed.. trying to find this host"
|
||||||
if ! sudo ldapsearch cn="$myhost'*'"
|
if ! sudo ldapsearch -x cn="$myhost'*'"
|
||||||
then
|
then
|
||||||
echo "Something went wrong. please check your configuration"
|
echo "Something went wrong. please check your configuration"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
echo "Please type what you are looking for"
|
echo "Please type what you are looking for"
|
||||||
read -r own
|
read -r own
|
||||||
if ! sudo ldapsearch | grep -i "$own"
|
if ! sudo ldapsearch -x | grep -i "$own"
|
||||||
then
|
then
|
||||||
echo "Something went wrong. please check your configuration"
|
echo "Something went wrong. please check your configuration"
|
||||||
exit
|
exit
|
||||||
@ -1296,7 +1296,7 @@ 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
|
||||||
if ! sudo ldapsearch | grep -i "$myhost"
|
if ! sudo ldapsearch -x | grep -i "$myhost"
|
||||||
then
|
then
|
||||||
echo "Something went wrong. please check your configuration"
|
echo "Something went wrong. please check your configuration"
|
||||||
exit
|
exit
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user