You are not logged in.
I have followed the instructions on the Wiki to enable usershares, made sure I'm in the `sambashare` groups, and that the ownership and permissions for /var/lib/samba/usershares are set to root:usershare and 1770. I have also created a samba user, named the same as my Linux user.
However, when I try to create a share in Dolphin I get the following error: "net usershare add: cannot convert name "Everyone" to a SID. {Access Denied} A process has requested access to an object but has not been granted those access rights..". If I try to change the permissions to disable Everyone and set them to my user I'll get the same error, just with my user name instead of Everyone.
The same error happens if I try to create the usershare using the command line:
sudo net usershare add 'Shared' /mnt/data/shared "Usershare example" yamashiro:r guest_ok=n
net usershare add: cannot convert name "yamashiro" to a SID. {Access Denied} A process has requested access to an object but has not been granted those access rights..
If I do sudo pdbedit -L -v the user is listed and there are both a user and primary group SIDs.
I'm really confused why it's not working , because the error doesn't really specify what permission is missing. And the odd thing is, usershares worked fine on my previous installation but I had to reinstall due to a hardware upgrade and now it just won't work. I followed the same instructions last time and I'm pretty certain I didn't change anything with my config files, so I'm really confused why it's not working.
Here is my smb.conf:
[global]
workgroup = WORKGROUP
server string = Yamashiro's Samba Server
server role = standalone server
log file = /var/log/samba/%m.log
max log size = 256
disable netbios = yes
dns proxy = no
server smb encrypt = required
# Disable printer sharing
load printers = no
printing = bsd
printcap name = /dev/null
disable spoolss = yes
show add printer wizard = no
# Usershares
usershare path = /var/lib/samba/usershares
usershare max shares = 128
usershare allow guests = yes
usershare owner only = yes
Any ideas what I'm missing to get this working again?
Last edited by Yamashiro (2025-06-19 16:35:01)
Offline
Same thing happens on my end on EndeavourOS when trying to create a samba share through dolphin, with the same error code.
An error occurred while trying to share the directory. The share has not been created.
Samba internals report:
net usershare add: cannot convert name "Everyone" to a SID. {Access Denied} A process has requested access to an object but has not been granted those access rights..
Offline
@Yamashiro : does the manual setup described above the dolphin/thunar part work for you ?
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
@Lone_Wolf I'm not entirely sure what part do you mean? Creating a usershare fails both in GUI (through Dolphin) and the command line with the same error.
Offline
Well that's odd, if I comment out the "server smb encrypt = required" line, it works. I tried changing required to desired but it still errored out so something about encryption is being problematic I guess.
Offline
I was testing this on and off for the past week and after adding/changing the following lines SMB encryption works now (confirmed with Wireshark).
map to guest = Bad User
security = user
passdb backend = tdbsam
client min protocol = SMB3
client signing = required
client smb encrypt = required
server min protocol = SMB3
server signing = required
server smb encrypt = required
# Also added/changed these two but are probably unrelated
usershare allow guests = no
logging = systemd
If anyone else wants to try and confirm this on their setup, might be a case of the Wiki section missing information or being outdated?
Edit:
When creating new shares on the GUI I still can't set permissions for "Everyone" or my users, I can only create a share if I set both to "---" but it I can still access the files on the server by logging in with my smb username and password and with read-only permissions applied (as originally intended). So it works but something about the setup procedure isn't quite right? But unlike previously, the "usershare_acl" field is set in the files inside the /var/lib/samba/usershares directory.
Last edited by Yamashiro (2025-06-27 15:29:54)
Offline