不知道是不是公司控管電腦的問題,我公司的電腦一直沒辦法存取 Samba 的目錄
今天終於下定決定找一找可能是什麼問題
先在 /etc/sambs/smb.conf 加上
log level = 3
之後,重啟 nmb/smb server
systemctl restart nmbd
systemctl restart nmbd
看到了 /var/log/samba/log.smbd 中的一段錯誤訊息
2021/04/15 12:11:11.313142, 3] ../lib/util/access.c:365(allow_access)
Allowed connection from 192.168.1.184 (192.168.1.184)
[2021/04/15 12:11:11.323575, 3] ../source3/lib/util_procid.c:54(pid_to_procid)
pid_to_procid: messaging_dgm_get_unique failed: No such file or directory
[2021/04/15 12:11:17.274381, 3] ../lib/util/access.c:365(allow_access)
Allowed connection from 192.168.1.184 (192.168.1.184)
[2021/04/15 12:11:17.289554, 3] ../source3/lib/util_procid.c:54(pid_to_procid)
pid_to_procid: messaging_dgm_get_unique failed: No such file or directory
跟劇此線索找到了有人提到,要修改 Windows Local Security Policy (secpol.msc) , 找到 Security Settings->Local Policies->Security Options->”Network security: LAN Manager authentication level.” Set it to “Send LM & NTLM – use NTLMv2 session security if negotiated.” 或是改 register file
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa]
"LmCompatibilityLevel"=dword:00000001
註:ntlm auth = yes 也要開,修改 /etc/samba/smb.conf ,然後重啟 nmbd/smbd
[global]
ntlm auth = yes
ref.
Samba and ntlm for Windows clients
發佈留言