![无法使用 nautilus-share 添加用户共享](https://linux22.com/image/1192551/%E6%97%A0%E6%B3%95%E4%BD%BF%E7%94%A8%20nautilus-share%20%E6%B7%BB%E5%8A%A0%E7%94%A8%E6%88%B7%E5%85%B1%E4%BA%AB.png)
当我尝试使用 nautilus-share pulgin 添加用户时,
'net usershare' returned error 255: net usershare add: cannot convert name "Everyone" to a SID. The transport connection is now disconnected..
我的 smbd.conf 内容出现以下错误:
[global]
workgroup = WORKGROUP
dns proxy = no
log file = /var/log/samba/%m.log
max log size = 1000
server min protocol = SMB2_02
server max protocol = SMB3
server role = standalone server
passdb backend = tdbsam
obey pam restrictions = yes
unix password sync = yes
passwd program = /usr/bin/passwd %u
passwd chat = *New*UNIX*password* %n\n *ReType*new*UNIX*password* %n\n *passwd:*all*authentication*tokens*updated*successfully*
pam password change = yes
map to guest = Bad Password
usershare allow guests = yes
name resolve order = lmhosts bcast host wins
security = user
guest account = guest
guest ok = yes
usershare path = /var/lib/samba/usershares
usershare max shares = 100
usershare owner only = false
force create mode = 0070
force directory mode = 0070
load printers = no
printing = bsd
printcap name = /dev/null
disable spoolss = yes
show add printer wizard = no
[homes]
comment = Home Directories
browseable = no
read only = yes
create mask = 0700
directory mask = 0700
valid users = %S
[printers]
comment = All Printers
browseable = no
path = /var/spool/samba
printable = yes
guest ok = no
read only = yes
create mask = 0700
[print$]
comment = Printer Drivers
path = /var/lib/samba/printers
browseable = yes
read only = yes
guest ok = no
我还检查了我的用户是否在 sambashare 组中,并且目录 /var/lib/samba/usershares 具有以下属性
drwxrwxrwx 2 root sambashare 4096 فبر 5 19:11 usershares
对于这个问题有什么建议吗?
答案1
来宾帐户 = 来宾
您确实有一个名为“guest”的用户吗?如果没有,您将收到完全相同的错误消息。
只需删除 smb.conf 中的行(Samba 将默认为用户“nobody”)。
然后重新启动smbd:
sudo service smbd restart
然后尝试再次创建共享。