windows - LookupAccountNameW returns SidTypeAlias, but expected SidTypeGroup -


i'm trying define type of entered credentials with:

sid_name_use pe; ... resolved=lookupaccountnamew (null,l"builtin\users",&sid,&cbsid,buff,&dd,&pe); 

no matter if enter "builtin\users" or "users" resolves returns sidtypealias in pe enum. expect sidtypewellknowngroup or sidtypegroup.

question: how reliably define if given string windows group name ?

the msdn page well-known sids briefly describes meaning of "alias" in context:

the following table has examples of domain-relative rids can use form well-known sids local groups (aliases).

one of table entries users group, behaviour describing expected.

you can continue use lookupaccountname() planned, need modify code recognize of sidtypealias, sidtypewellknowngroup, or sidtypegroup represent groups.


Comments

Popular posts from this blog

cron - how to properly run Python script with crontab on every system startup -

elasticsearch - Is the order of operations guaranteed in a bulk update? -

Slow performance first queries on SQL Azure -