大网数据广告活动
服务器运维问答

Older CIFS can not mount shares from Samba-4 server

· 52CE 我爱测

I have a media-player, which used to connect to my main computer running Samba without a problem. It is running an old version of embedded Linux (kernel 2.6.22.19-27) and has CIFS. At some point, after I upgraded Samba software o…

问题原文

原帖链接 · Mikhail T. · CC BY-SA 3.0

I have a media-player, which used to connect to my main computer running Samba without a problem. It is running an old version of embedded Linux (kernel 2.6.22.19-27) and has CIFS.

At some point, after I upgraded Samba software on the server (samba-4.6.8 running on FreeBSD-10.4 at the moment), the player lost this ability -- it can still list the same exported shares, but can no longer open anything: "wrong credentials".

An SMB-capable application on my phone opens the same folders just fine (using the same credentials)...

Is there some option I need to explicitly turn on the server to enable some sort of compatibility mode with old clients?

Update: based on the suggestion by @Tin, I added the following line to the [global]-section of smb4.conf: max protocol = NT1 Unfortunately, this hasn't changed things -- I can still connect from most systems except the media player, which still tells me, my credentials are no good.

Using tcpdump on the server I captured the following exchange:

    SMB PACKET: SMBnegprot (REQUEST)
    SMB Command   =  0x72
    Error class   =  0x0
    Error code    =  0 (0x0)
    Flags1        =  0x0
    Flags2        =  0x1
    Tree ID       =  0 (0x0)
    Proc ID       =  1283 (0x503)
    UID           =  0 (0x0)
    MID           =  1 (0x1)
    Word Count    =  0 (0x0)
    smb_bcc=12
    Dialect=NT LM 0.12

To which the server responds:

SMB PACKET: SMBnegprot (REPLY)
SMB Command   =  0x72
Error class   =  0x0
Error code    =  0 (0x0)
Flags1        =  0x80
Flags2        =  0x3
Tree ID       =  0 (0x0)
Proc ID       =  1283 (0x503)
UID           =  0 (0x0)
MID           =  1 (0x1)
Word Count    =  17 (0x11)
NT1 Protocol
DialectIndex=0 (0x0)
SecMode=0x3
MaxMux=50 (0x32)
NumVcs=1 (0x1)
MaxBuffer=16644 (0x4104)
RawSize=65536 (0x10000)
SessionKey=0xA4AA
Capabilities=0x80F3FD
ServerTime=Sun Oct  1 18:00:38 2017
TimeZone=240 (0xf0)
CryptKey=Data: (1 bytes)
...

The client then says:

    SMB PACKET: SMBsesssetupX (REQUEST)
    SMB Command   =  0x73
    Error class   =  0x0
    Error code    =  0 (0x0)
    Flags1        =  0x0
    Flags2        =  0x1
    Tree ID       =  0 (0x0)
    Proc ID       =  1283 (0x503)
    UID           =  0 (0x0)
    MID           =  2 (0x2)
    Word Count    =  13 (0xd)
    Com2=0xFF
    Res1=0x0
    Off2=0 (0x0)
    MaxBuffer=16644 (0x4104)
    MaxMpx=50 (0x32)
    VcNumber=0 (0x0)
    SessionKey=0x0
    CaseInsensitivePasswordLength=24 (0x18)
    CaseSensitivePasswordLength=24 (0x18)
    Res=0x0
    Capabilities=0x80D0DC
    Pass1&Pass2&Account&Domain&OS&LanMan=
    smb_bcc=179
    ...

and finally the server:

SMB PACKET: SMBsesssetupX (REPLY)
SMB Command   =  0x73
Error class   =  0x6D
Error code    =  49152 (0xc000)
Flags1        =  0x80
Flags2        =  0x3
Tree ID       =  0 (0x0)
Proc ID       =  1283 (0x503)
UID           =  0 (0x0)
MID           =  2 (0x2)
Word Count    =  0 (0x0)
NTError = STATUS_LOGON_FAILURE
smb_bcc=0

What is going on?

Update: The way I can mount anything is by creating an account with empty password (smbpasswd -n ...) and editing smb.conf to allow null passwords.

已采纳解答

原帖链接 · Mikhail T. · CC BY-SA 3.0

Ok, here is a list of changes to default settings introduced in Samba-4.5. In my case, I had to explicitly change one thing back to "yes" to allow my media-players to access the server:

[global]
    ntlm auth = yes

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2017-10-01)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。