When I do a ldap search using the command Ldapserach -x -b 'dc=domain,dc=com''(objectclass=*)' it gives an error stating ldap_bind: Can't contact LDAP server (-1).

I am doing a ldap search on the centos server.

link|improve this question

25% accept rate
feedback

1 Answer

Try either giving ldapsearch the -h <hostname> or -H <uri> options, pointing ldapsearch to the host your ldap server is running on.

Alternatively, ldapsearch will look in /etc/openldap/ldap.conf or ${HOME}/.ldaprc, for directions on what to assume for -H/-h (among other things) by default. (See man 5 ldap.conf for the syntax of .ldaprc/ldap.conf)

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.