Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Localized group name

I want to configure a Mutex access rule by assigning privileges to the "Everyone" group. When I create my rule it looks something like the following

new MutexAccessRule("Everyone", MutexRights.Modify | MutexRights.Synchronize | MutexRights.TakeOwnership | MutexRights.ReadPermissions, AccessControlType.Allow)

How do I get the localized "Everyone" group name so this will work on a non english version of the OS.

Thanks

like image 711
user38309 Avatar asked Mar 19 '09 18:03

user38309


1 Answers

Rather than using the group name, use the underlying SID, which is not localised.

var rule = new MutexAccessRule(new SecurityIdentifier(WellKnownSidType.WorldSid, null),
                               MutexRights.Modify
                                | MutexRights.Synchronize 
                                | MutexRights.TakeOwnership
                                | MutexRights.ReadPermissions,
                               AccessControlType.Allow)
like image 119
Richard Avatar answered Sep 20 '22 15:09

Richard