Windows

在 Windows 10 上訪問公共 samba 共享時訪問被拒絕

  • January 14, 2021

我正在嘗試將 samba 配置為在我的網路上公開共享文件夾,但是我也想要私人文件夾。我遇到了一個問題,當我創建 samba 帳戶時,如果您以 samba 使用者身份登錄,則拒絕訪問所有共享。我正在從 Windows 10 PC 連接文件系統正在執行 Devuan 2.0.0(Debian 的一個分支)

這是 samba.conf 中包含的內容

[global]
   workgroup = WORKGROUP 
   dns proxy = no
   map to guest = Bad User
   log file = /var/log/samba/log.%m
   max log size = 100
   server role = standalone server
   passdb backend = tdbsam
   obey pam restrictions = yes
   unix password sync = yes
   passwd program = /usr/bin/passwd %u
   pam password change = yes
   map to guest = bad user
   usershare allow guests = yes
   unix extensions = no
   
[Public]
   comment = pubic share
   hosts allow = 1.1.1.100/24, 127.0.0.1
   hosts deny = 0.0.0.0/0
   path = /mnt/Niflheim/Public
   public = yes
   read only = yes
   guest ok = yes
   guest only = no
   
[Private]    
   comment = home share
   hosts allow = 1.1.1.100/24, 127.0.0.1
   hosts deny = 0.0.0.0/0
   path = /mnt/Niflheim/Home
   valid users = USER, @USERGROUP
   read only = no
   browsable = no
   writeable = yes
   writeable list = USER

例如,如果我創建一個名為 USER 的 samba 帳戶並登錄,那麼我將無法訪問任何共享,但如果我不登錄,則所有公共共享都可用。

這只是我的電腦的問題,而 smb 共享沒有問題。他們是我的電腦與我的 dns 伺服器通信的方式有問題,

只是通過重新安裝Windows修復它

引用自:https://serverfault.com/questions/1049255