Bug 12895 - Please reopen bug 12540 (SMB min protocol 3.x connection issues), as it's resurfaced in 4.6.4
Please reopen bug 12540 (SMB min protocol 3.x connection issues), as it's res...
Status: REOPENED
Product: Samba 4.1 and newer
Classification: Unclassified
Component: File services
4.6.4
x64 FreeBSD
: P5 normal
: ---
Assigned To: Samba QA Contact
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2017-07-12 02:31 UTC by Stilez
Modified: 2017-07-12 22:23 UTC (History)
1 user (show)

See Also:


Attachments
Relevant 1 second section from smbd.log using d 10 (47.36 KB, application/octet-stream)
2017-07-12 02:31 UTC, Stilez
no flags Details
smb4.conf (conf was static except for server min protocol which varied or was removed for testing) (4.74 KB, text/plain)
2017-07-12 21:27 UTC, Stilez
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stilez 2017-07-12 02:31:52 UTC
Created attachment 13360 [details]
Relevant 1 second section from smbd.log using d 10

Using Samba 4.6.4 (FreeNAS 11.0-U1).  With {min,max} protocol {3,3.11} and {3.02,3.11} connection failed; with {---,3.11} it succeeded. Looks identical to bug 12540.


Tested with "smbclient -L \\SVRNAME" run on the same server. Result:


OUTPUT WITH MIN=3, MAX = 3.11:
root@svr1:~ # smbclient -L svr
protocol negotiation failed: NT_STATUS_INVALID_NETWORK_RESPONSE


OUTPUT WITH MIN=3.02, MAX = 3.11:
root@svr1:~ # smbclient -L svr
protocol negotiation failed: NT_STATUS_INVALID_NETWORK_RESPONSE


OUTPUT WITH MIN UNSET ("-----"), MAX = 3.11:
root@svr:~ # smbclient -L svr
Enter WORKGROUP\root's password:
        Sharename       Type      Comment
        ---------       ----      -------
        {correct list of shares}
        IPC$            IPC       IPC Service (Samba 4.6.4-GIT-5fe3bc2)


In case the log provides a better trace for the issue, I've attached a (slightly sanitised) log of what looks like the relevant connection using d 10, there were no other logs timestamped from the period of time the command was run.
Comment 1 Stilez 2017-07-12 02:41:57 UTC
NB - when this one's resolved one way or another, can someone post a heads-up at https://bugs.freenas.org/issues/25104

Thanks
Comment 2 Stefan Metzmacher 2017-07-12 12:12:25 UTC
(In reply to Stilez from comment #0)

You need to tell the client to use "client max protocol = SMB3"
or pass -mSMB3 to smbclient.

The effective default of "client max protocol" was changed from "NT1"
to "SMB3" with Samba 4.7.0rc1.
Comment 3 Stilez 2017-07-12 21:24:16 UTC
Unfortunately having tried your suggestions (thank you!) it looks more, not less, like the same bug.  

I set SMB_max to SMB3 as you said, modified "server min protocol" and restarted Samba. Then I dumped the smb4.conf entries and the output of smbclient -L. 

I did this for a range of minimum options (min,max) = (3_02,3), (3_00,3), (2_10,3), (---,3), and back to (3_00,3). 

As I reported, only the second last (no minimum) of these worked. So this bug doesn't look invalid as a result, please reopen:



<pre>
# grep proto smb4.conf
    server min protocol = SMB3_02
    server max protocol = SMB3
# smbclient -L svr
    protocol negotiation failed: NT_STATUS_INVALID_NETWORK_RESPONSE
</pre>_Edit server min protocol to 3.00 and restart samba:_<pre>
# grep proto smb4.conf
    server min protocol = SMB3_00
    server max protocol = SMB3
# smbclient -L svr
    protocol negotiation failed: NT_STATUS_INVALID_NETWORK_RESPONSE
</pre>_Edit server min protocol to 2.10 and restart samba:_<pre>
# grep proto smb4.conf
    server min protocol = SMB2_10
    server max protocol = SMB3
# smbclient -L svr
    protocol negotiation failed: NT_STATUS_INVALID_NETWORK_RESPONSE
</pre>_Edit server min protocol to UNSET ("-----") and restart samba:_<pre>
# grep proto smb4.conf
    server max protocol = SMB3
# smbclient -L svr
    Enter WORKGROUP\root's password:

    Sharename       Type      Comment
    ---------       ----      -------
    {list of shares correct}
    IPC$            IPC       IPC Service (Samba 4.6.4-GIT-5fe3bc2)
    Server               Comment
    ---------            -------
    Workgroup            Master
    ---------            -------
    WORKGROUP
</pre>_Edit server min protocol to 3.00 and restart samba:_<pre>
# grep proto smb4.conf
    server min protocol = SMB3_00
    server max protocol = SMB3
# smbclient -L svr
    protocol negotiation failed: NT_STATUS_INVALID_NETWORK_RESPONSE</pre>
Comment 4 Stilez 2017-07-12 21:27:36 UTC
Created attachment 13368 [details]
smb4.conf (conf was static except for server min protocol which varied or was removed for testing)
Comment 5 Stefan Metzmacher 2017-07-12 21:38:36 UTC
(In reply to Stilez from comment #3)

You didn't read my comment! The problem is the client!!!!
Reread comment #2
Comment 6 Stilez 2017-07-12 22:01:09 UTC
Ok, confirmed. Sorry. 

In mitigation, I was following the formal troubleshooting docs from Samba's own website, which didn't seem to mention this.

It would be worth highlighting that info in man and in the troubleshooting pages. Can you, or if not, how would I raise that as a request?
Comment 7 Stefan Metzmacher 2017-07-12 22:10:06 UTC
(In reply to Stilez from comment #6)

In which manpage should that be documented?
Comment 8 Stefan Metzmacher 2017-07-12 22:23:12 UTC
(In reply to Stefan Metzmacher from comment #7)

And how?

man smb.conf documents that "client max protocol" is NT1 by default.