在主机上测试 Samba 服务器会导致 NT_STATUS_INVALID_NETWORK_RESPONSE

los*_*uru 3 server samba 19.04

smbclient -L localhost在 Samba 服务器主机上运行返回:

Unable to initialize messaging context
protocol negotiation failed: NT_STATUS_INVALID_NETWORK_RESPONSE
Run Code Online (Sandbox Code Playgroud)

想知道我是否在做一些真正愚蠢的事情。谷歌一无所获。寻找我能得到的任何帮助。

相关信息如下。如果我还能提供什么,请告诉我。


服务器正在Ubuntu 19.04 Live Server运行Samba 4.10.0

systemctl status smbd.service两人systemctl status nmbd.service都回来了Active: active (running)Status: *mbd: ready to serve connections...所以看起来他们运行得很好。

ifconfig使用(ie )的服务器本地 IP 地址192.168.1.xxx而不是localhost不起作用。

添加client max protocol = SMB3到全局配置设置不会执行任何操作。server max protocol = SMB3似乎已经是默认的。除了客户端最大线路之外添加client min protocol = SMB3server min protocol = SMB3也不起作用。

smbclient -L localhost以 root 身份运行会导致该Unable to initialize messaging context行消失,但该protocol negotiation failed: NT_STATUS_INVALID_NETWORK_RESPONSE行仍然会被打印。

相关目录的文件系统是 ZFS zpool,由四个 HDD 的条带镜像组成。zfs set sharesmb=onzfs set sharenfs=on为所有文件系统设置。

网络接口是,但使用和eno1将其添加到配置文件中不会执行任何操作。interfaces = 127.0.0.0/8 eth0 eno1bind interfaces only = yes

不要认为这很重要,因为这一步甚至还没有达到,但 samba 帐户密码是为所有已经使用的用户帐户创建的smbpasswd

在这里也不认为这很重要,但ufw配置了ufw allow from 192.168.0.0/16 to any app Samba,但ufw直接禁用也没有帮助。

/etc/samba/smb.conf文件:

[global]
   workgroup = REDACTEDGROUP
   server string = REDACTED Samba Server v%v @ %h
   hide unreadable = yes
   read only = no
   hosts allow = 192.168.0.0/16
   hosts deny = 0.0.0.0/0
   log file = /var/log/samba/log.%m
   logging = file
   map to guest = Bad User
   max log size = 1000
   obey pam restrictions = Yes
   pam password change = Yes
   panic action = /usr/share/samba/panic-action %d
   passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
   passwd program = /usr/bin/passwd %u
   server role = standalone server
   unix password sync = Yes
   usershare allow guests = Yes
   idmap config * : backend = tdb

[REDACTEDBox]
   comment = REDACTED file hosting
   path = /box/REDACTED
   valid users = @groupa, @groupb, @wheel
   write list = @groupa, @wheel
   read list = @groupb
   guest ok = no
   create mask = 0774
   directory mask = 0775

[PublicBox]
   comment = REDACTED public file hosting
   path = /box/public
   guest ok = yes
   create mask = 0775
   directory mask = 0775
Run Code Online (Sandbox Code Playgroud)

testparm配置文件显示没有问题。

小智 5

我将 -m SMB3 添加到 smbclient 命令中,问题就消失了。我在这里找到了解决方案:https://github.com/dperson/samba#troubleshooting