[python-win32] Converting objectSid attribute value to a PySID

Suzuki Alex Alex.Suzuki at ksta.ktzh.ch
Tue Jan 10 16:08:04 CET 2006


Hi everyone,

I'm working with users in Active Directory, and I would like to
use their SID for subsequent file system operations (i.e. assigning
permissions to folders). I would like to use the SID saved in the
objectSid attribute, but I do not know how to convert it to a
win32security.PySID object.

I acquire the SID from an ADSI user object using user.Get("objectSid").
It's in a binary form, and I don't seem to find any information on
the format. I know there is a win32security.ConvertStringSidToSid
function, but I do not know how to get to the string representation.

I would be grateful for any ideas or pointers to documentation.

cheers, Alex


More information about the Python-win32 mailing list