我在 18.04 上设置了一个 samba 服务器,但在访问 sambashares 时遇到了问题
- 用户可以通过 samba 访问他的主文件夹(所以我知道 [samba] 用户存在,凭证已被识别)
- 同一用户可以不是访问任何 sambashare(即使用户属于所需组,访问权限也是
774
)
smb.conf 如下所示:
[global]
workgroup = WORKGROUP
server string = %h server (Samba, Ubuntu)
dns proxy = no
log file = /var/log/samba/log.%m
max log size = 1000
syslog = 0
panic action = /usr/share/samba/panic-action %d
server role = standalone server
passdb backend = tdbsam
obey pam restrictions = yes
unix password sync = no
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
pam password change = yes
map to guest = bad user
#============== Share definitions =======================
[samba]
comment = Share for group Warehouse
path = /srv/smb/samba/
browseable = yes
writeable = yes
force create mode = 0660
force directory mode = 0660
Valid users = @sambausers
知道这个问题的根源是什么吗?
答案1
显然是共享的父文件夹的组(/srv/smb
就我而言)做实际上很重要。
将其更改为sambashare
(我的所有 samba 用户都是成员)解决了这个问题。