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

Buchan Milne bgmilne at cae.co.za
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

=1000+2*uid

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
http://www.sysinternals.com

SID for \\bgmilne:
<DOMAIN_SID>-2002

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 .....

Buchan

>Date: Wed, 28 Nov 2001 13:37:17 +0100 (Central Europe Standard Time)
>From: "Martin.Doule" <Martin.Doule at czech.sun.com>
>To: <mike at jurney.org>
>Cc: <samba-ntdom at lists.samba.org>
>Subject: Re: domain SID
>
>
>You can get your domain SID by utility psgetsid.exe from www.sysinternals.com.
>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.
>
>CU
>
>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         http://www.cae.co.za






More information about the samba-ntdom mailing list