[Samba] Issues with FLOCK on NFS Share

Rowland penny rpenny at samba.org
Mon Jul 6 08:30:26 UTC 2020


On 06/07/2020 08:28, Georg.Biberger--- via samba wrote:
> How can i achieve that the user qqeda11 is mapped to the  the unix id 79846?
> Background: All NFS files are only accessible by unix user qqeda11 with unix id 79846!
>
> Georg

Where does '79846' come from ?

If you run this: cat /etc/passwd | grep 'qqeda11'

Do you get something like this:

qqeda11:x:79846:79846:qqeda11,,,:/home/qqeda11:/bin/bash

If you do, then your user isn't an AD user.

If you read 'man idmap_rid', you will find the calculation to map an AD 
user to a Unix ID:

ID = RID - BASE_RID + LOW_RANGE_ID

BASE_RID is usually 0 but you can set it to what you want

WARNING, BOTCH AHEAD

So, as you want the user to have the Unix ID 79846 and the user has the 
RID 1581344 in AD, you could set the low range to 0, this would end up 
with the calculation becoming:

79846 = 1581344 - 1501498 + 0

You would need these lines in smb.conf:

idmap config MUC : backend     = rid
idmap config MUC : range = 0-500000000
idmap config MUC : base_rid = 1501498

This would work for one ID '79846', I cannot be sure about another ID's

BOTCH END

There must be a better way of doing this, you could use the 'ad' 
backend, but this would entail adding uidNumber & gidNumber attributes 
to AD, but you could give 'qqeda11' the exact Unix ID you require.

Rowland






More information about the samba mailing list