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
58d3910f42
commit
ec423eb73f
@ -1278,10 +1278,18 @@ 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"
|
||||||
sudo ldapsearch cn="$myhost'*'"
|
if ! sudo ldapsearch cn="$myhost'*'"
|
||||||
|
then
|
||||||
|
echo "Something went wrong. please check your configuration"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
echo "Please type what you are looking for"
|
echo "Please type what you are looking for"
|
||||||
read -r own
|
read -r own
|
||||||
sudo ldapsearch | grep -i "$own"
|
if ! sudo ldapsearch | grep -i "$own"
|
||||||
|
then
|
||||||
|
echo "Something went wrong. please check your configuration"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
exit
|
exit
|
||||||
else
|
else
|
||||||
sudo apt-get install ldap-utils -y
|
sudo apt-get install ldap-utils -y
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user