This is my /etc/hosts file:
This is my ldap.conf file:
I am getting
"ldap_sasl_bind(SIMPLE): Can't contact LDAP server(-1)"
when I run this command:
ldapsearch -x -H "ldap://ldap.techvictus.local" -P 3 -LLL -b "dc=techvictus,dc=local"
This is my /etc/hosts file:
This is my ldap.conf file:
I am getting
"ldap_sasl_bind(SIMPLE): Can't contact LDAP server(-1)"
when I run this command:
ldapsearch -x -H "ldap://ldap.techvictus.local" -P 3 -LLL -b "dc=techvictus,dc=local"
I don't think the hostname ldap.techvictus.local
is actually addressable... (i.e. a hostname that can be resolved in an IP address).
Try ldap://localhost
hostname
and fqdn
in /etc/hosts
and /etc/ldap/ldap.conf
files. –
Rhumb I had followed this link is working fine for me
https://lea-linux.org/documentations/Trucs:Ldap_sasl_bind_cant_contact_LDAP_server
The idea for above link just make sure the parameter in the /etc/openldap/ldap.conf has paramters are setting like this.
TLS_CACERTDIR /etc/openldap/certs
TLS_REQCERT never
In my case (Debian 12 LXC container) I had to install libldap-common
and add TLS_REQCERT never
to /etc/ldap/ldap.conf:
apt -y install ldap-utils libldap-common
echo "TLS_REQCERT never" >> /etc/ldap/ldap.conf
I'm pretty sure you've figured it out by now but leaving a comment here for others.
I was having the same issue and I realized that the domain name I was using was just a made-up (fake domain name like: marvel.comics
). So I modified ldap.conf
to have URI ldap://${IP_ADDRESS}
and it worked.
It seems like you originally configured your ldap.conf with your IP address. However, your /etc/hosts
seems odd to me.
I recommend using your system's IP address rather than 127.0.1.1
. Also use FQDN after the IP address.
192.168.1.123 hulk.marvel.comics hulk
127.0.0.1 localhost
and the rest...
© 2022 - 2025 — McMap. All rights reserved.