Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am using a Windows 2008 Server as my LDAP server and on a Ubuntu 12.04 client I am trying to connect to it. I get the following error:

nss_ldap: could not connect to any LDAP server as (null) - Can't contact LDAP server

From my Ubuntu client I run the following:

ldapsearch -h -D admin -w password -s base dc=ad,dc=xxx,dc=com -p 389

and get the following success message

# search result
search: 2
result: 0 Success

Any help would be greatly appreciated.

share|improve this question
ok, I found that I didn't have the binddn in formation right in the ldap.conf file so I added the following: # The distinguished name to bind to the server with. # Optional: default is to bind anonymously. binddn cn=admin,dc=ad,dc=xxx,dc=com nss_ldap: could not connect to any LDAP server as cn=admin,dc=ad,dc=xxx,dc=com - Can't contact LDAP server –  wirelessman Aug 27 '12 at 17:33

Your Answer


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

Browse other questions tagged or ask your own question.