1

I'm on centos, and I need to check that an AD server is running (is in another host). Which is the simplest way to check ldap (AD) is running? I have an application where I need to synchronize some users account with AD, but suddenly I'm getting 0 users found. I don't know much about AD and LDAP, I just tested with:

[root@mysystem]# ldapsearch -x
ldap_sasl_bind(SIMPLE): Can't contact LDAP server (-1)

Is that enough to check that LDAP is down? Or can it be another reason?

pmiranda
  • 113

1 Answers1

1

Can't contact LDAP server (-1) doesn't explicitly mean that your AD isn't "running".
There are few things that could cause that error.

  • Server being shutdown
  • Deamon stopped
  • and many more...

You might also have some misconfiguration, or something else blocking you to contact your AD.

However, if you can ldapsearch with some anonymous request (with -x) just before, I suppose that's an acceptable way to check.

If I refer myself to this previous post How to test a LDAP connection from a client, the test you're currently using should be fine. (considering it was working before, and it's a connectivity issue, and not a misconfiguration)

Make yourself sure that anonymous authentication are enable, and you can actually query the AD with it.

enter image description here

Tolsadus
  • 1,215