ldapsearch -H ldap://your_dc.example.com \ -b '<sid=S-1-5-21-XXXXXXXXXX-XXXXXXXXXX-XXXXXXXXXX-XXXX>' \ -s base \ '(objectClass=*)' member
oh okay. Thanks for your explanation.
I changed my code to:
struct timeval timeout = {10,0}; char *attr_list[] = {"member", NULL}; LDAPMessage *searchresult = NULL;
gch = get_gch_from_queue(); sts = ldap_search_ext_s(gch->ld, "<sid=S-...>", LDAP_SCOPE_BASE, "(objectClass=*)", attr_list, 0, NULL, NULL, &timeout, LDAP_NO_LIMIT, &searchresult);
and this returns a status of LDAP_UNWILLING_TO_PERFORM
What am I doing wrong ?