Samba uid to RID mapping [was Re: domain SID]

Buchan Milne bgmilne at
Thu Nov 29 08:42:10 GMT 2001

For fun I decided to run this util on our Samba PDC. I note that the 
last four digits (RID?) are for users are


For example, my uid on the PDC is 501, and my full SID is:
X:\win32\Utilities\Sysinternals\Pstools>psgetsid  bgmilne

PsGetSid v1.1 - local and remote account/machine SID displayer
Copyright (C) 2000 Mark Russinovich

SID for \\bgmilne:

Where the DOMAIN_SID is the same as that samba has in MACHINE.SID, and 
that retreived by

X:\win32\Utilities\Sysinternals\Pstools>psgetsid  <DOMAIN_NAME>

Note, I have only tested this on one domain with a samba PDC and about 
10 users to validate this. It would be better to look in the code .....


>Date: Wed, 28 Nov 2001 13:37:17 +0100 (Central Europe Standard Time)
>From: "Martin.Doule" <Martin.Doule at>
>To: <mike at>
>Cc: <samba-ntdom at>
>Subject: Re: domain SID
>You can get your domain SID by utility psgetsid.exe from
>It's one of the PSTOOLS 1.5 and it's freeware.
>To get domain SID just run command 'psgetsid.exe my_domain_name'. To ensure that
>you got right SID try to ask for few domain users accounts by 'psgetsid.exe
>user_domain_account'. You'll have to get same numbers as domain SID except last
>four digits which are users RID.
>I also suggest to not run this tool from PDC and also do not ask for users SID
>if you'll have same account names on your local computer that you are running
>this utility.
>Martin Doule
>System Administrator, Forte Tools	Sun Microsystems Czech, s.r.o.
>Software System Group			Evropska 33e
>					160 00  Prague 6
>Tel: +420-2-33009193			Internal: x49193
>Fax: +420-2-33009299			Mobile: +420-606-625752

|----------------Registered Linux User #182071-----------------|
Buchan Milne                Mechanical Engineer, Network Manager
Cellphone * Work       +27 82 472 2231 * +27 21 808 2497 ext 202
Stellenbosch Automotive Engineering

More information about the samba-ntdom mailing list