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?
samba shares with multiple users
samba shares with multiple users
Last edited by Ovitus on 2019/01/24 19:01:12, edited 1 time in total.
-
- Posts: 2019
- Joined: 2015/02/17 15:14:33
- Location: Bulgaria
- Contact:
Re: samba shares with multiple users
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.
Re: samba shares with multiple users
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?
-
- Posts: 2019
- Joined: 2015/02/17 15:14:33
- Location: Bulgaria
- Contact:
Re: samba shares with multiple users
I think so... Is it working properly?
Re: samba shares with multiple users
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