Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question

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)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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