rom*_*oms 20 networking linux encryption samba windows-10
我正在尝试使用命令连接到 Windows 10 Pro(版本 1511,内部版本 10586.589)的 samba 共享net use L: \\myserver\myshare /u:myuser mypassword。我收到错误:
System error 86 - The specified network password is not correct.
Run Code Online (Sandbox Code Playgroud)
使用 Map network drive 对话框时,我得到了相同的结果。其他客户端(Android、Linux)可以使用相同的用户/密码正常连接。
我尝试通过 secpol.msc 调整以下安全策略:
我在 Arch Linux (4.7.4-1) 上运行 samba 4.5.0-2。服务器端,我已经重置了用户密码,将用户删除并重新添加到 smbpasswd 后端,并启动并重新启动了 smbservice。
我的 smbconf 基本上是默认的:
[global]
workgroup = MYGROUP
server string = Samba Server
log file = /var/log/samba/%m.log
max log size = 50
security = user
encrypt passwords = yes
smb passwd file = /etc/samba/smbpasswd
unix password sync = Yes
passwd program = /usr/bin/passwd %u
passwd chat = *New*UNIX*password* %n\n *ReType*new*UNIX*password* %n\n *passwd:*all*authentication*tokens*updated*successfully*
dns proxy = no
[my share]
comment = my share
browseable = yes
writable = yes
guest ok = no
path = /pathto/myshare
public = no
valid users = myuser
create mask = 770
Run Code Online (Sandbox Code Playgroud)
我在 testparm 中没有看到任何异常,并且我已经通过 pdbedit 确认我的用户肯定是在后端注册的。
在今天之前它运行良好,我不知道为什么它突然停止工作。任何意见是极大的赞赏。
小智 32
您还可以在服务器 (Ubuntu 18.04.1 LTS) 端修复此问题:在 中/etc/samba/smb.conf,放置:
ntlm auth = true
Run Code Online (Sandbox Code Playgroud)
它就像一个魅力。
rom*_*oms 18
如果其他人遇到此问题,我的解决方案是调整 Windows 客户端上的安全策略。
运行 > Secpol.msc
然后我将本地策略 > 安全选项 > 网络安全:LAN Manager 身份验证级别设置为“仅发送 NTLMv2 响应”。拒绝 LM 和 NTLM'
和客户端连接就像以前一样。
小智 8
接受的答案是正确的,适用于 Windows 10 Professional 及更高版本。但是,Windows 10 家庭版缺少secpol.msc易于使用的界面。
要在 Windows 10 Home 上修复此问题,请导航到注册表中的以下项:
HKLM\SYSTEM\CurrentControlSet\Control\Lsa
Run Code Online (Sandbox Code Playgroud)
查找名为LmCompatibilityLevel. 如果它不存在,请创建它。将值设置为5。
进行此更改后,我无需重新启动即可立即访问 Samba 服务器。
来源:在 Windows NT 上更改 LAN Manager 身份验证
小智 8
当您厌倦了与 Windows 和 Samba 的斗争时,请访问这里:
https://github.com/billziss-gh/sshfs-win
它是通过 SSH 共享文件。不需要 Samba 或试图让 Windows 运行良好。