png*_*ngl 22 linux windows ubuntu samba
我有一个在 Ubuntu 14.04 上运行的 Samba 服务器版本 4.1.11。我无法从 Windows 10 连接(但我可以从 Windows 7 连接)。
服务器和客户端不在同一个 LAN 上。
Windows 给出的错误信息是服务器在线但没有响应。但是,Samba 日志另有说明。
我附上了来自 Windows 10 的失败连接尝试的日志,以及来自 Windows 7 的成功尝试的日志(用于比较)。
简而言之,与成功的尝试不同,失败的尝试开始于:
switch message SMBnegprot (pid 2855) conn 0x0
Run Code Online (Sandbox Code Playgroud)
然后它在选择之前请求许多不同的协议SMB2_FF。然后,经过一些安全协商后,它切换到协议SMB 2.???,然后SMB3_00是:
Server exit (NT_STATUS_END_OF_FILE).
Run Code Online (Sandbox Code Playgroud)
成功尝试SMB2_10从一开始就选择协议,但 Windows 10 甚至没有请求此协议。
以下是日志:
尝试失败(来自 Windows 10)
http://pastebin.com/M0xmBuY3
成功尝试(来自 Windows 7)
http://pastebin.com/jF8VzaiA
我在评论中添加了我的 smb.conf 文件(不能有超过 2 个具有 <10 声誉的链接)
这解决了我的问题:
Windows 10 将尝试协商 SMB3_11,Samba4 尚不支持,
除了当前的 4.3 候选版本。我怀疑现在
在 Windows 10 客户端上禁用SMB2/3 是您最好的选择,如果不是理想的选择。可在
此处找到有关操作的说明:https : //support.microsoft.com/en-us/kb/2696547
https://lists.samba.org/archive/samba/2015-September/193886.html
小智 5
我想我有一个适用于 Windows 7 - 10 和 Server 2012 的解决方案
就我而言,注释掉我的“smb 端口 139”行有帮助。
我正在使用 FreeBSD 10 和 Samba 4.4.5
这是我的 SMB4.conf 的副本。我希望它可以帮助某人。
[global]
netbios name = SERV
server string = FreeBSD Samba Server
security = ADS
workgroup = FFTPJ
realm = fftpj.local
log file = /var/log/samba4/%m.log
log level = 1
# Default idmap config used for BUILTIN and local windows accounts/groups
idmap config *:backend = tdb
idmap config *:range = 2000-9999
# idmap config for domain FFTPJ
idmap config DOMAIN:backend = rid
idmap config DOMAIN:range = 10000-99999
# Use template settings for login shell and home directory
winbind nss info = template
winbind enum users = Yes
winbind enum groups = Yes
winbind use default domain = yes
client use spnego = yes
client ntlmv2 auth = yes
encrypt passwords = yes
restrict anonymous = 2
valid users = @"Domain Users
# **** When smb ports is Set Windows 10 clients cannot connect
#smb ports = 139
load printers = No
disable spoolss = Yes
local master = No
hide dot files = No
wide links = No
store dos attributes = yes
vfs objects = acl_xattr
map acl inherit = yes
[images]
comment = Images Drive
path = /images
read only = No
[backups]
comment = Backup Drive
path = /data/backup
read only = No
Run Code Online (Sandbox Code Playgroud)
问题:Windows 在最新的 Windows 操作系统上删除了 SMB v1 协议,Linux 尝试使用 v1 协议连接,Windows/Linux 无法尝试协议 2、3 等。
解决方法:编辑 linux (ubuntu) Samba conf 文件:
须藤纳米 /etc/samba/smb.conf
在 [GLOBAL] 部分添加:
客户端最小协议 = SMB2
客户端最大协议 = SMB3
然后保存文件并重新启动samba
就我而言,我还必须明确输入密码或我的 Samba 用户,但我认为这是我的特定系统问题。