smbclient --max-protocol=NT1: why it requres setting MIN protocol too?

Rowland Penny rpenny at
Tue Oct 25 17:57:18 UTC 2022

On 25/10/2022 16:45, Michael Tokarev via samba-technical wrote:
> Hi!
> When trying to use current smbclient to connect to, say, a windowsXP 
> machine
> (which implements only NT1 protocol), smbclient has to be told to use lower
> protocol version than it's default - this is intended.
> But the thing is that it doesn't work:
>    $ smbclient --max-protocol=NT1 //testhost/share
>    Unable to initialize messaging context
>    protocol negotiation failed: NT_STATUS_INVALID_PARAMETER_MIX
> Using -m/--max-protocol=NT1 *also* requires setting another option:
>    $ smbclient --max-protocol=NT1 --option='client min protocol = CORE' 
> //testhost/share
> This way it actually works.
> Can't smbclient either warn about this situation, or better yet,
> lower its min protocol automatically if it is greater than
> the requested max protocol?
> Thanks,
> /mjt

I am just trying to understand this, from what I thought I knew. SMB is 
a negotiating protocol, so shouldn't smbclient negotiate the best 
version of SMB to use ? i.e. You shouldn't have to tell it what version 
to use.


More information about the samba-technical mailing list