[Samba] Getting UID and GID via LDAP/LDB query on a non-rfc2307 domain...

Rowland Penny rpenny at samba.org
Thu Jan 15 18:12:52 UTC 2026


On Thu, 15 Jan 2026 15:00:59 +0100
Marco Gaiarin via samba <samba at lists.samba.org> wrote:

> Mandi! Rowland Penny via samba
>   In chel di` si favelave...
> 
> > The Unix UID or GID does not exist in AD if you do not use rfc2307
> > attributes.
> > The 'rid' idmap backend calculates the UID or GID from the objects
> > RID and the low range set in the smb.conf file using this
> > calculation: ID = RID + LOW_RANGE_ID
> 
> Rowland, i know that. I'm simply asking if Samba compute this (and
> clealy, the answer is 'yes' ;) and store on some operational/hidden
> LDAP field that i can explicitly query on.
> 

Sorry, but no, Samba does not store anything in AD if you use the 'rid'
or 'autorid' idmap backend. 
I take it you need to get Unix IDs on non domain joined machines, my
only suggestion would be to obtain the user or group objectSid
attribute, get the RID from that and calculate the ID using the
domain low range you use on Unix domain members.

Rowland
 



More information about the samba mailing list