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

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

closed as off-topic by Paranoid Panda, Ron, Warren Hill, Maythux, Luís de Sousa Jul 23 at 6:52

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This describes a problem that can't be reproduced that seemingly went away on its own or was only relevant to a very specific period of time. It's off-topic as it's unlikely to help future readers." – Paranoid Panda, Ron, Warren Hill, Maythux
If this question can be reworded to fit the rules in the help center, please edit the 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

Browse other questions tagged or ask your own question.