Rowland Penny
2025-Dec-13 10:09 UTC
[Samba] Getting UID and GID via LDAP/LDB query on a non-rfc2307 domain...
On Fri, 12 Dec 2025 15:48:09 +0100 Marco Gaiarin via samba <samba at lists.samba.org> wrote:> > If i need to get UID and GID for a user, but without rfc2307 schema > installed and used (so, using RID), and i need to use pure LDAP/LDB > query, there's some hidden field to query to? > > Or i need to query for 'objectSid', strip RID, sum to base ID? > > > Thanks. >Not sure I understand what you are asking, the rfc2307 schema is a standard part of the AD schema, that is all the rfc2307 attributes are available, they just are not populated by default You then go on to mention 'RID', this is what Windows uses along with the rest of the SID. If you are actually referring to using the Samba 'rid' idmap config backend, then that uses the RID to calculate the UID or GID. Can you please explain just what you require. Rowland
Marco Gaiarin
2026-Jan-06 18:12 UTC
[Samba] Getting UID and GID via LDAP/LDB query on a non-rfc2307 domain...
Mandi! Rowland Penny via samba In chel di` si favelave...> Can you please explain just what you require.suppose i need to build a pure-LDAP script to query some aspect of user data. If i use rfc2307 and i need UID/GID, i can simply query it (uidNumber and gidNumber). If i use RID, i've some operational field to query UID/GID? Or i need in script to extract SID, strip last part (RID), extract 'domain base id' from samba conf, use standard formula to compute UID (and similar way, GID)? I hope i was clear now. Thanks. --