samba shares with multiple users

General support questions
Post Reply
Ovitus
Posts: 27
Joined: 2018/12/07 16:01:43

samba shares with multiple users

Post by Ovitus » 2019/01/23 18:35:20

I have two servers both with users alice and bob. They have the same user id on both servers. I have my samba share configured as so:

[share]
comment = share
path = /share
valid users = alice bob
writeable = yes

These are mounted to the second server, using the credentials of alice. When I try to write to the share as user bob I get permission denied. Why?
Last edited by Ovitus on 2019/01/24 19:01:12, edited 1 time in total.

hunter86_bg
Posts: 2019
Joined: 2015/02/17 15:14:33
Location: Bulgaria
Contact:

Re: samba shares with multiple users

Post by hunter86_bg » 2019/01/23 20:00:01

If you use ntlmssp or kerberos , you can use the multiuser mount option .
To use multiuser, you must additionally set the sec=security_type mount option to a security type which supports providing credentials in a non-interactive way, such as krb5 or the ntlmssp option with a credentials file.

The root user mounts the share using the multiuser option and an account that has minimal access to the contents of the share. Regular users can then provide their user name and password to the current session's kernel keyring using the cifscreds utility. If the user accesses the content of the mounted share, the kernel uses the credentials from the kernel keyring instead of the one initially used to mount the share.

Ovitus
Posts: 27
Joined: 2018/12/07 16:01:43

Re: samba shares with multiple users

Post by Ovitus » 2019/01/24 19:00:49

Ok, so I setup a third user to mount as root in read-only mode, created a write list of the actual users, then added the multiuser option to fstab. I did not have to set "sec=ntlmssp." Is that the default?

hunter86_bg
Posts: 2019
Joined: 2015/02/17 15:14:33
Location: Bulgaria
Contact:

Re: samba shares with multiple users

Post by hunter86_bg » 2019/01/25 05:06:52

I think so... Is it working properly?

Ovitus
Posts: 27
Joined: 2018/12/07 16:01:43

Re: samba shares with multiple users

Post by Ovitus » 2019/01/25 14:25:59

yeah seems to be working. I've noticed some issues with cifscreds not releasing credentials for users when run with the "clear all" option. But I think it's a matter of the user logging in and out

Post Reply