无法写入可写的 Samba 共享

无法写入可写的 Samba 共享

我在 Ubuntu 17.04 服务器上运行最新的稳定版 samba 4.6.4,尽管我已将共享[homes]设置为read only = nowriteable = yes(并且已禁用 SElinux),但我无法让登录用户执行写入操作。我遗漏了什么?

这是我的 smb.conf:

[global]

   log level = 3 passdb:5  auth:10 winbind:2
   workgroup = ARW
   server string = %h server (Samba, Ubuntu)
   wins support = yes
   log file = /var/log/samba/log.%m
   max log size = 1000
   # panic action = /usr/share/samba/panic-action %d


   server role = standalone server
   passdb backend = tdbsam
   obey pam restrictions = yes
   unix password sync = yes
   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

[homes]
   comment = Home Directories
   browseable = no

   read only = no
   create mask = 0700
   directory mask = 0700
    valid users = %S
    path = /srv/samba/users/%S
    writeable = yes

[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

任何帮助都非常感谢。如果需要,我可以发布更多信息。

答案1

好吧,答案相当愚蠢。我没有清除 /var/lib/samba 缓存和本地用户数据库,它们不同步,并且没有将主要组映射到“域用户”。

所以我遇到这个问题的真正原因是 tdbsam 和域用户映射到用户组 ID 之间的凭据不匹配。

相关内容