Instruction
1
Call the main system menu by pressing the "start" button, and navigate to the Run dialog. Type regedit in the Open box, and confirm the utility of the registry editor by clicking the OK button. Open thread
HKEY_LOCAL_MACHINE\Software\Microsoft\WindowsNT\CurrentVersion\ProfileList
find all user IDs (SID). Navigate to the key ProfikeImagePath find the corresponding SID value for the user name. Shut down utility registry editor.
2
The reverse operation, when a well-known SID of the user and you want to determine the name of the account, can be performed using the command reg.exe. In this case, the command syntax looks like this:
reg query HKEY_LOCAL_MACHINE\Software\Microsoft\WindowsNT\CurrentVersion\ProfileList\\ProfileImagePath.
3
Use the built-in GetSID utility that allows you to determine the unique ID of the selected user. The command syntax looks like this:
drivename:\>getsid
Usage: getsid \\server1 account \\server2 account.
4
Alternative method software obtain the SID of the desired user is to use the SecurityIdentifier class to .NET Framework 2.0. In this case, the identifier may be displayed as a string, byte array, or combination of values WellKnownSidType SID and domain. An additional condition of obtaining the desired result is to appeal to the WindowsIdentity class. The syntax of this command looks like:
using System;
using System.Security.Principal;
namespace GetSID
{
class Program
{
static void Main (string[] args)
{
WindowsIdentity wid = Windowsidentity.GetCurrent();
Console.WriteLine(wid.Name + SID is 0, wid.User.Value);
Console.Read();
} } }.