Win32 account SID lookup if user and group have the same name?

55 views Asked by At

How can I get the SID for either user XOR group if both have the same name?

Remember Unix and Linux allow that a user "danfsh" can have his own group "danfsh". That works fine there, but on Win32 there is only LookupAccountSidA() which has no way to distinguish whether you want a user SID or a group SID.

How can I get the SID for group "danfsh", or the SID for user "danfsh", without getting the wrong type of SID?

I already tried LookupAccountSidA(), and I only get the user SID, even if there is a group with the same name but different SID.

0

There are 0 answers