来宾用户的 Samba 配置

来宾用户的 Samba 配置

win10 已禁用 SMB2 来宾帐户。如果我尝试下面的 samba 标准配置,则适用于 win7。

win10 上的解决方法是从客户端重新启用 SMB2 来宾帐户:

Open the Local Group Policy editor
Go to Computer Configuration\Administrative Templates\Network\Lanman Workstation
For the setting, "Enable insecure guest logons" right click and choose Edit.
Choose "Enabled" and click Ok

作品!

我的问题是我不想将此密钥更改为所有 Windows 客户端,但如果我不做任何更改,我就无法完全连接到我的文件服务器:

"Windows cannot access \\DEBIAN10-1"

我的目标(对于某些 Win10 客户端)无需更改本地组策略编辑器即可访问受密码保护的共享文件夹

cat /etc/samba/smb.conf

[global]
        security = user
        map to guest = Bad User 
        nobody = guest
        netbios name = debian10-1
        guest account = nobody 
        log file = /var/log/samba/%m.log

[public]
        comment = Public share
        path = /home/user/
        guest ok = yes
        read only = no
        force user = nobody
        force group = nobody
        create mask = 0664
        directory mask = 0775

[no public]
        path=/home/nopublic
        guest ok = no
        admin users = root 
        valid users = user1, user2, user3, user4, user,5

相关内容