0

I have the following username mapping in Samba:

master = johndoe user2 user3
regular = user5 user6
restricted = johndoe user8 user9

By default, Samba will always map johndoe to the last entry in username.map, that is restricted.

Any idea how to map johndoe to multiple entries? I need this, because there are some shares where not all users have access, but some users (like johndoe) must have access.

Șerban
  • 1
  • 1

1 Answers1

0

You cannot map a user to multiple entries. Samba would take your user (johndoe) and match it to 'master' on the first line, but it wouldn't stop there, it would try the second line and then the third, where it would find 'johndoe' again and map it to 'restricted', this would replace the originally found 'master'.

You could use 'vfs_acl_xattr' and use 'setfacl' to set the permissions for users without the usermapping.