如何使用新的 smbclient 连接到旧的 Samba 服务器?

如何使用新的 smbclient 连接到旧的 Samba 服务器?

我运行了一个基于 Linux 的多媒体盒smbd,其版本报告为3.0.30

smbclient4.10以前可以连接,但是,升级客户端后4.13.8,我NT_STATUS_CONNECTION_DISCONNECTED一启动就立即...

我确信,这是由于最新版本的 Samba 中某些选项被禁用所致——但是是哪一个呢?我可以通过编辑重新启用它smb.conf(如何?),还是完全删除它并且我需要将客户端降级(到 4.12?)?

在调试级别 9 下,我得到的结果如下:

Processing section "[global]"
doing parameter raw NTLMv2 auth = yes
lpcfg_do_global_parameter: WARNING: The "raw NTLMv2 auth" option is deprecated
doing parameter lanman auth = yes
lpcfg_do_global_parameter: WARNING: The "lanman auth" option is deprecated
doing parameter ntlm auth = yes
doing parameter log level = auth:1000
doing parameter workgroup = Xxxxxxx
doing parameter server string = Xxxxx Samba Server
doing parameter security = user
doing parameter client use spnego = yes
lpcfg_do_global_parameter: WARNING: The "client use spnego" option is deprecated
doing parameter hosts allow = 192.168.1. 127.
doing parameter load printers = yes
doing parameter guest account = nobody
doing parameter log file = /var/log/samba/log.%m
doing parameter max log size = 50
doing parameter socket options = SO_RCVBUF=8192 SO_SNDBUF=8192
doing parameter dns proxy = no
doing parameter unix charset = koi8-u
pm_process() returned Yes
lp_servicenumber: couldn't find homes
added interface bce1 ip=192.168.1.8 bcast=192.168.1.255 netmask=255.255.255.0
added interface ib0 ip=192.168.2.11 bcast=192.168.2.255 netmask=255.255.255.0
added interface ib1 ip=192.168.3.11 bcast=192.168.3.255 netmask=255.255.255.0
Netbios name list:-
my_netbios_names[0]="xxxx"
Client started (version 4.13.8).
Opening cache file at /var/db/samba4/gencache.tdb
sitename_fetch: No stored sitename for realm ''
name dune1#20 found.
Connecting to 192.168.1.167 at port 445
Socket options:
        SO_KEEPALIVE = 0
        SO_REUSEADDR = 0
        SO_BROADCAST = 0
        TCP_NODELAY = 0
        TCP_KEEPCNT = 8
        TCP_KEEPIDLE = 7200
        TCP_KEEPINTVL = 75
        IPTOS_LOWDELAY = 0
        IPTOS_THROUGHPUT = 0
        SO_REUSEPORT = 0
        SO_SNDBUF = 8192
        SO_RCVBUF = 8192
        SO_SNDLOWAT = 2048
        SO_RCVLOWAT = 1
        SO_SNDTIMEO = 0
        SO_RCVTIMEO = 0
 session request ok
protocol negotiation failed: NT_STATUS_CONNECTION_DISCONNECTED

降级回 4.10 后,上述详细日志记录以正确的密码提示结束:

Connecting to 192.168.1.167 at port 445
Socket options:
        SO_KEEPALIVE = 0
        SO_REUSEADDR = 0
        SO_BROADCAST = 0
        TCP_NODELAY = 0
        TCP_KEEPCNT = 8
        TCP_KEEPIDLE = 7200
        TCP_KEEPINTVL = 75
        IPTOS_LOWDELAY = 0
        IPTOS_THROUGHPUT = 0
        SO_REUSEPORT = 0
        SO_SNDBUF = 8192
        SO_RCVBUF = 8192
        SO_SNDLOWAT = 2048
        SO_RCVLOWAT = 1
        SO_SNDTIMEO = 0
        SO_RCVTIMEO = 0
 session request ok
 negotiated dialect[NT1] against server[dune1]
Enter Xxxx\xx's password: 

有 ”NT1方言“已从 Samba-4.12 和 4.13 中删除?我可以通过配置文件重新启用它吗?

答案1

将以下行添加到[global]的部分后smb.conf,我能够让 Samba-4.13 连接到该设备:

smb配置文件

[global]
client min protocol = NT1

相关内容