Solved: bind_ldap_simple: lookup(ldap): Unable to bind to the LDAP server: (default), error Can’t contact LDAP server.

In this article, we will see an interesting issue where the ldap is not able to get one of the automount map.

However ldap is working with authentication, and able to get all other maps.

 

I. Error Message:

Jun 08 07:59:52 awshost.ngelinux.com automount[84186]: parse_ldap_config: lookup(ldap): ldap authentication configured with the following options:
Jun 08 07:59:52 awshost.ngelinux.com automount[84186]: parse_ldap_config: lookup(ldap): use_tls: 0, tls_required: 0, auth_required: 1, sasl_mech: (null)
Jun 08 07:59:52 awshost.ngelinux.com automount[84186]: parse_ldap_config: lookup(ldap): user: (null), secret: unspecified, client principal: (null) credential cache: (null)

un 08 07:59:52 awshost.ngelinux.com automount[84186]: do_init: parse(sun): init gathered global options: noacl,vers=3
Jun 08 07:59:52 awshost.ngelinux.com automount[84186]: do_bind: lookup(ldap): auth_required: 1, sasl_mech (null)
Jun 08 07:59:52 awshost.ngelinux.com automount[84186]: bind_ldap_simple: lookup(ldap): Unable to bind to the LDAP server: (default), error Can't contact LDAP server
Jun 08 07:59:52 awshost.ngelinux.com automount[84186]: do_bind: lookup(ldap): ldap simple bind returned -1

 

II. Solution
To solve the issue in my particular case, i created below link as automount is picking up the file from /etc/openldap directory.

# ls -ltr /etc/openldap/ldap.conf
lrwxrwxrwx 1 root root 14 Jun  8 08:33 /etc/openldap/ldap.conf -> /etc/ldap.conf

## Now restart the service.
# service autofs restart

 

III. Root Cause

/etc/openldap/ldap.conf is the default file that exists on server.

To solve this we have removed it and linked to /etc/ldap.conf, our LDAP config file.
 
And restarted the autofs to take effect.

And then we have rebooted it and performed a clean check if its fine now.
0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments