Given the SID of a user or a group, how can I find a LDAP object that belongs to it?
LDAP Server ist Active Directory (Windows Server 2008).
A LDAP query String would be useful.
|
Given the SID of a user or a group, how can I find a LDAP object that belongs to it? A LDAP query String would be useful. | |||
|
feedback
|
|
I wish it was as easy as: dsget user "objectSID={thesid},CN=Users,DC=domain,DC=com" -samid But it's not; AD stores the objectSID as hexadecimal. The folks on serverfault have written a few answers that may help, though: | |||
|
feedback
|
|
Another way would be to forsake LDAP and use WMIC:
Now you have several attributes that should be easy to search via LDAP, if you still need to. | |||||
feedback
|
objectSIDattribute is from the Active Directory schema, it is not defined in the LDAP Schema. – jscott Aug 17 '11 at 12:00