Sometimes you need the SID of a user or group. For example if you want to set permissions with icalcs in multilanguage environments. icacls needs as input the group name or the SID. If you want to set permission for the builtin groups you have to specify the group name in the current language of the operating system, i.e. “Users” for en-US and “Benutzer” for de-DE. The better choice is the SID, the SIDs for builtin groups are always the same.
To get the SID of a Windows user or group use the PsGetSid command. The command is part of the sysinternalssuite.
The sysinternalssuite is for free and you can download it at Microsoft. No installation is necessary simply extract the zip file.
Get the SID of the local Users group
PsGetSid v1.44 - Translates SIDs to names and vice versa
Copyright (C) 1999-2008 Mark Russinovich
Sysinternals - www.sysinternals.com
SID for BUILTIN\Users:
to set the permissions with icacls by using the SID add an asterisk as prefix to tell icacls this is a SID.
icacls d:\ /grant *S-1-5-32-545:(OI)(CI)(M,W,RX)