parse "nTSecurityDescriptor" attribute problem

parse "nTSecurityDescriptor" attribute problem

Post by dais » Thu, 21 Jun 2001 16:08:01

How to parse the detail of "nTSecurityDescriptor" attribute by LDAP Api?

I using ldap_search_s() function to retrieve only attribute
"nTSecurityDescriptor" ,
then the code as follows:
    ULONG  valueCount = 0, i;
    pEntry = ldap_first_entry(ld, pMsg);
    attrName = ldap_first_attribute(ld, pEntry, &ptr);

    struct berval**  values = ldap_get_values_len(ld, pEntry, attrName);
    valueCount = ldap_count_values_len(values);
    printf("%s%s: count=%d\n", offset, attrName, valueCount);

Then, how to parse berval structure that inside is "nTSecurityDescriptor"
attribute value?
The parse purpose is to get the informations, such as DACL, ... etc,.
Maybe include the detail of DACL, ACL and ACE.
Like using ADSI, get_DiscretionaryAcl() method to retrieve the detail of

I would program that delegate a user to manage the OU by LDAP api, not ADSI.

If anybody knows, please help me.



1. Changing AD-Attributes: "cn", "name"


I have the followig problem. I have try to change AD
attributes with a simple VB script. It is possible to
change all AD attributes with the two exception: the
attribites "CN" and "name" are not changeable because the
operating system doesnt allow access.

What can I do to change these attributes?

The script:

Set objUser = GetObject _  
objUser.Put "l", "Germany"
objUser.Put "CN", "new_username"  


generic levitra india
generic levitra india
what happens if a woman takes viagra

2. Amiga 3000 Sale

3. """""""""""""""""""""""""""''product ID""""""""""""""""""""""""""'''

4. Noise Filter

5. Error on <<dsobject.Put "ntSecurityDescriptor", sd>>

6. Problems with Office2000 on an older Dell laptop

7. "My AD Folder" between "My Documents" and "My Computer"?

8. Mouse problems on DOS

9. "Start" "Run" "????????"

10. Explorer "Read" access but deny "copy" and "write"

11. "RIS" + "choice screen options" + " custom setup"

12. Default settings for "Open" "Save", "Save As" etc.

13. "Unknown User" in "My Computer" | "Properties" After Win98 Re-install