If you’ve ever tried to manage File and Folder permissions or browsed through the Registry, you might have seen a long string values, something like “S-1-5-21-3011698416-3634052959-2884390752-500.” These are known as Security Identifiers or SIDs for short. Each and every user will have a unique SID attached to them. If you’ve never heard of SIDs (Security Identifiers), you might be wondering what in the world those are. After all, you will never see these security identifiers in plain sight, e.g, in the Control Panel or in the Settings app.
What Is an SID?
A Security Identifier is a unique string of values that is issued by an authority, like Windows domain controller, to each and every security principal and security group. The security identifier is automatically created when a security principal or group is created. Once the SID is created, it is stored in the security database and is retrieved as and when needed.
Combining the SID and user rights, Windows gives you, the user, an access token every time you log into your system. This access token in turn provides the security context and gives you appropriate permissions and rights to manage your Windows system.
Simply put, SID is one of the important parts of the Windows Security Model.
Other than the automatically generated SIDs, Windows also has a few universal well-known SIDs such as Everyone, Local Authority, World, NT Authority, and All Services. You can find all the well-known SIDs here.
There are many ways to find the SID of a specific user or all users on Windows. I will show a few of them. Use the one that suits your needs.
Find the SID of Current User
To find the SID of the current user, you can use one of two commands, both of them are single-line commands.
First, search for “Command Prompt” in the start menu and open it. After opening the command prompt, execute the below command. It will neatly list your current username of the SID associated with it.
Alternatively, you can use the Windows Management Interface Command (WMIC). Just execute the below command, and it will list the SID and username.
Find the SID of Specific User
If you want to view the SID of a specific user, then all you have to do is replace
%username% in the above WMIC command with the actual username of the user.
Once replaced, the command looks something like the following:
Find the SID of All Users
Apart from the user accounts you create, Windows automatically creates some default accounts like the guest, administrator, WDAGUtilityAccount, etc. If you want to find the SIDs of all the users on your system, execute the below command:
There is also a PowerShell command to achieve the same thing. Open PowerShell from the Start menu. Now, execute the below command, and it will list all the SIDs of all users along with their usernames.
Find SID using Registry Editor
Unsurprisingly, you can use the Registry Editor to find the SID of any user with just a few clicks. If you don’t like dealing with the Command Prompt or PowerShell, then this is a good alternative.
To start, search for “regedit” in the Start menu and open it, then go to the following location:
Under the ProfileList key you will see both well-known and user account SIDs. The user account SIDs will be longer. To find which SID belongs to which user, click on the SID on the left panel, and you will see the username in the right-panel next to the value ProfileImagePath.
Comment below sharing your thoughts and experiences about using the above method to find the SID of users in Windows.
Image Credit: John Swindells