Score:0

Samba username mapping not working as desired

mx flag

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.

Score:0
jp flag

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.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.