Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

1 Answer 1

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

 
discard

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.