Bug 12880 - smbclient: different errors depending on protocol nt1/smb2
Summary: smbclient: different errors depending on protocol nt1/smb2
Status: RESOLVED FIXED
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Tools (show other bugs)
Version: 4.7.0rc1
Hardware: All All
: P5 regression (vote)
Target Milestone: 4.7
Assignee: Andrew Bartlett
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-07-05 22:17 UTC by Giulio
Modified: 2017-08-30 07:19 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Giulio 2017-07-05 22:17:33 UTC
Remote host: Windows 7
Client: smbclient 4.7.0rc1

Summary: 
- win7 system setup with user/password
- run smbclient w/o specifying any password (blank/empty password)
- if the protocol is nt1  the error is NT_STATUS_ACCESS_DENIED
- if the protocol is SMB2 the error is NT_STATUS_REVISION_MISMATCH
is this expected?

I have scripts parsing smbclient output, and it would be useful to know if NT_STATUS_REVISION_MISMATCH is a specific error relating to a problem with protocol negotiation, or is more of a generic error that can be returned when using SMB2/3


Detail:
$ ./smbclient -s /dev/null -L go-vm-win7 -Uwrong% -m nt1
Anonymous login successful
 
        Sharename       Type      Comment
        ---------       ----      -------
Error returning browse list: NT_STATUS_ACCESS_DENIED    <==== expected
Anonymous login successful
 
        Server               Comment
        ---------            -------
 
        Workgroup            Master
        ---------            -------

$ ./smbclient -s /dev/null -L go-vm-win7 -Uwrong% -m smb2
Anonymous login successful
 
        Sharename       Type      Comment
        ---------       ----      -------
Error returning browse list: NT_STATUS_REVISION_MISMATCH    <===  unexpected
Anonymous login successful
 
        Server               Comment
        ---------            -------
 
        Workgroup            Master
        ---------            -------
$

A debug "-d 10" produce identical logs, but for the line with the "Error returning browse list" error.


============

When also using the password, the errors are the same as I'd expect:
 
$ ./smbclient -s /dev/null -L go-vm-win7 -Uwrong%wrong -m nt1
session setup failed: NT_STATUS_LOGON_FAILURE

$ ./smbclient -s /dev/null -L go-vm-win7 -Uwrong%wrong -m smb2
session setup failed: NT_STATUS_LOGON_FAILURE

When using a correct user/password I have access to the shares both with nt1 and smb2.
Comment 1 Stefan Metzmacher 2017-08-30 07:19:03 UTC
I think with the patches of bug #12863 the situation has improved
and the messages are no longer confusing.