How to determine if a SID is group or user?
tpot at linuxcare.com.au
Fri Nov 10 00:22:00 GMT 2000
Gerald Carter writes:
> > How would I figure out if a specific ACE entry pertains to
> > a group or a user?
> > I can go in and look at the uid and/or gid with sid_to_uid
> > or sid_to_gid (from the ace), but there must be some
> > way to differentiate between the group and user ace's.
> Samba uses the last bit as a flag. Of course, this
> is entirely different from NT. No idea how to do it
> on Win32. See passdb/passdb.c:pdb_rid_is_user() for details.
I think the only way to do it in NT is to call the lookup sid
function and check the returned name type value. This should say
whether the sid is a domain, domain group, domain alias or user
More information about the samba-technical