[Samba] configuring Shares, Users with Samba 4.0.5 as an AD DC

Pekka L.J. Jalkanen pekka.jalkanen at vihreat.fi
Mon May 20 02:50:29 MDT 2013

Hi Thierry,

that command is called "wbinfo". For details, run "wbinfo --help". Some
examples below:

To find the Windows sid of an uid, run:
"wbinfo -U 3000000" (or any other uid).

That sid can in turn be used to find the username:
"wbinfo -s S-1-5-32-544"

So if you want to combine the whole thing into one, just run:

"wbinfo -s `wbinfo -U 3000000`"

Which should output something like:

"BUILTIN\Administrators 4"

The number following the username just tells how many Windows users or
groups are represented by that uid, if I'm understanding it correctly.

For reversed direction (to get the uid from username), try:

"wbinfo -S `wbinfo -n Administrator`"

Although in most cases you should be able to just run "getent passwd
username" to find the uid, whether the account is a windows account or not.

Pekka L.J. Jalkanen

On 20.5.2013 11:16, Thierry Gonon wrote:
> Hello Ulrich,
> It's simply the uid (user id) that are given by samba.
> You should have a command to find who ius which number, but I don't know it yet (I'm new to samba too !!)
> Thierry Gonon
> Archéologue - Administrateur Systèmes et Réseaux
> Responsable Informatique
> Chronoterre Archéologie
> ----- Mail original -----
> De: "Ulrich Schneider" <man at ulrichschneider.de>
> À: samba at lists.samba.org
> Envoyé: Lundi 20 Mai 2013 10:03:25
> Objet: Re: [Samba] configuring Shares, Users with Samba 4.0.5 as an AD DC
> I created two folders as different win users in a samba share.
> 1. Folder is testadmin created as user Domain Administrator
> 2. Folder is testschueler2 created as user schueler2
> ls -la
> drwxrwxr-x+ 2 3000000 users 4096 Mai 20 09:57 testadmin
> drwxrwxr-x+ 2 3000026 users 4096 Mai 20 09:59 testschueler2
> What`s that number starting wird 3... and how do I know that this number 
> belongs to wich user?
> Uli

More information about the samba mailing list