October 4th, 2004, 11:01 PM
ldap_search_s() error via C API
Does anyone know why I get an "Operations Error" when I try and search the directory via ldap_search_s() in the C API?
The only way i get a result back is if a specify NULL for the DN and FILTER, and set the scope as the LDAP_SCOPE_BASE. This will print out the contents of the node at the "RootDSE", not the "Domain" naming context which I want.
How do I reference the "Domain" naming context instead?
October 5th, 2004, 10:39 AM
care to post the code you're trying?
October 6th, 2004, 09:49 AM
Nevermind. I figured it out. I need to authenticate to the directory with the appropriate credentials. I was binding to the directory using NULL as the ID/pwd. Doing it this way only allows me access to the RootDSE. After reading a bit, I found that you have to use valid credentials, other than NULL, to see the Domain subtree.
Originally Posted by bubby