Samba 4.5 失去寫入權限

Samba 4.5 失去寫入權限

我將一台機器從 Debian Jessie 更新到 Stretch,這也將 Samba 版本從 4.2.14 升級到 4.5.16。我可以掛載 Samba 共享、瀏覽和讀取它,但當我嘗試寫入內容時權限被拒絕。

我的 smb.conf 看起來像這樣,並且在 Samba 4.2.14 上運行良好:

[global]
   workgroup = video
   server string = %h server (Samba %v)
   dns proxy = no
   log file = /var/log/samba/log.%m
   max log size = 1000
   panic action = /usr/share/samba/panic-action %d
   obey pam restrictions = yes
   invalid users = root
   security = user  
   map to guest = Bad User
   os level = 33
   socket options = TCP_NODELAY
   unix charset = UTF-8
   strict allocate = yes
   log level = 3

[backup]
   comment = backup
   path = /mnt/backup
   writeable = yes
   public = yes
   force user = vdr
   read only = no
   guest ok = yes

我在 Samba 日誌中發現以下內容:

[2020/07/15 09:55:06.621634,  3] ../source3/auth/auth.c:178(auth_check_ntlm_password)
  check_ntlm_password:  Checking password for unmapped user []\[vdr]@[] with the new password interface
[2020/07/15 09:55:06.621717,  3] ../source3/auth/auth.c:181(auth_check_ntlm_password)
  check_ntlm_password:  mapped user is: [VDR]\[vdr]@[]
[2020/07/15 09:55:06.621865,  3] ../source3/auth/check_samsec.c:400(check_sam_security)
  check_sam_security: Couldn't find user 'vdr' in passdb.
[2020/07/15 09:55:06.621922,  2] ../source3/auth/auth.c:315(auth_check_ntlm_password)
  check_ntlm_password:  Authentication for user [vdr] -> [vdr] FAILED with error NT_STATUS_NO_SUCH_USER
[2020/07/15 09:55:06.622054,  3] ../source3/auth/auth_util.c:1611(do_map_to_guest_server_info)
  No such user vdr [] - using guest account

使用者 vdr 存在於 /etc/samba/smbpasswd 中。我還該看哪裡?

答案1

回答我自己的問題:smbpasswd -a vdr解決了我的問題。與 Samba 4.2 相比,Samba 4.5 似乎變得更加嚴格。

相關內容