I am trying to do a LDAP search and it is not working on my Active Directory Test Server. I use this code:
#include
...
LDAP* ld = ldap_ini
Unless otherwise configured, you must bind using a valid account name and password for Microsoft Active Directory servers, otherwise it will return the operations error for all queries except a very small handful.
i.e. that:
ldap_simple_bind_s(ld, NULL, NULL);
Needs to be replaced with something like:
char *username = "cn=aUser,ou=Users,dc=myDomain,dc=extension";
char *password = "this is the password";
ldap_simple_bind_s(ld, username, password);