[Samba] List of users seems truncated or incomplete in file server member of an Active Directory Domain
rpenny at samba.org
Fri Mar 12 13:19:38 UTC 2021
On 12/03/2021 12:25, David PAUGAM via samba wrote:
> Then, I unwillingly made a mistake in smb.conf and it worked!! The 2
> previous commands returned the good numbers!
> Surprisingly, the conf seemed to work when the idmap Domain name is
If it only works with the 'wrong' DOMAIN name then you have major problems.
> Here is the "working" smb.conf, which must be wrong. And this time,
> the mistake is done intentionnally ;-)
> winbind enum users=yes
> winbind enum groups=yes
> winbind use default domain=yes
> idmap config * : backend = tdb
> idmap config * : range = 3000-7999
> #Here are the "bad" lines / bad domain, which actually solved the
> "getent passwd"
> idmap config WRONGDOM : backend = rid
> idmap config WRONGDOM : range = 10000-999999
> Is there an explanation to this behaviour?
Possibly, I feel sure that if you check, that you will find all your
users are getting id's in the 3000-7999 range
> Is there a way to check the way rid works?
I already showed you how the winbind 'rid' backend works, but I will go
through it again, but in a bit more depth.
You have two domains in your smb.conf, the default domain (*) and the
The default domain uses an allocating backend and is meant for the Well
Known SIDs (e.g. Administrators, Domain Computers, etc) and anything
outside the main domain (MYDOM). There are less than 200 Well Known SIDs
Your main domain (MYDOM) uses the winbind 'rid' backend, this uses the
users RID to calculate the users Unix id, the formula is this:
ID = RID + LOW_RANGE_ID
So, if the users RID is '1000', the calculation becomes this:
ID = 1000 + 10000
ID = 11000
If the calculated id is greater than '999999' (the upper range set in
smb.conf), the user will be ignored.
The above also applies to groups.
As I also said, if one user works and the other doesn't, then you need
to compare the working users object in AD with the non working users AD
, if you are unsure about any differences, copy them into a file and
send them to me.
More information about the samba