#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2004
    Posts
    2
    Rep Power
    0

    Question 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?

    Thanks!
    bubby
  2. #2
  3. Psycho Canadian
    Devshed Demi-God (4500 - 4999 posts)

    Join Date
    Jan 2001
    Location
    Canada
    Posts
    4,846
    Rep Power
    635
    care to post the code you're trying?
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2004
    Posts
    2
    Rep Power
    0

    Smile


    Originally Posted by bubby
    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?

    Thanks!
    bubby
    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.

    Thanks!

IMN logo majestic logo threadwatch logo seochat tools logo