Disclaimer

The SMBv1 protocol is from the 1983, it is unsecure and thus disabled for a good reason. The SMBv2 protocol has been available since 2006.

Problem Description

I arrived at this question trying to find a solution for the following two problems:

  1. I have an HP printer that can only use the legacy SMBv1 protocol (HP OfficeJet Pro 8620). So my printer refused to connect to the network share and the scan to network feature stopped working.
  2. I tried to use Nautilus to browse the network shares on my own Ubuntu system. And I was getting an error with the message Unable to access location Failed to retrieve share list from server: Invalid Argument:

Solution

After several attempts with different values in the /etc/samba/smb.conf file I was finally able to resolve these problems using these two values:

client min protocol = NT1
server min protocol = NT1

I also found posts that suggested to add this third parameter:

ntlm auth = ntlmv1-permitted

However, on my system this was not necessary.

Explanation

As I understand it, the client min protocol option controls how your system communicates with other SMB servers, changing this option could be useful if your Ubuntu system works as a client and you want to use SMBv1 to access a server. By default (with Samba 4.11) your local Samba installation is configured to require SMBv2 or higher connections.

On the other hand, if your Ubuntu system acts as the server that requires SMBv2 or higher and you have a remote client (such as a printer) that can only understand the legacy SMBv1 protocol, then it seems that changing the client min protocol has no effect. Instead you need to change the server min protocol. This way the client can negotiate SMBv1 with the Samba daemon running on your Ubuntu system.

Side note, you can also pass the client min protocol option to tools such as smbclient, for example:

smbclient -L //<hostname>/<folder> --option='client min protocol=NT1'

Can be used to set the client protocol to SMBv1. This was useful to test the effect of changes in the smb.conf file.

I tried this on Ubuntu 20.04 which comes with samba version 4.11. I have not tested this solution on older Ubuntu distributions.

Answer from lanoxx on askubuntu.com
🌐
Linux Mint Forums
forums.linuxmint.com › board index › main edition support › networking
Samba configuration - NT1 vs others - Linux Mint Forums
December 22, 2022 - To connect to my FreeBSD server from Linux Mint 21.1 64bit Xfce I added : client min protocol = NT1 server min protocol = NT1 below the line 'workgroup = WORKGROUP' line This worked, I can now connect to the Samba (version 4.12.15) running on the FreeBSD server.
🌐
Samba
samba.org › samba › docs › current › man-html › smb.conf.5.html
smb.conf
Note that most command line tools support --option='client min protocol=NT1', so it may not be required to enable SMB1 protocols globally in smb.conf.
Discussions

PSA: Fix to SMBv1 smbclient issues - Machines - Hack The Box :: Forums
That means that if you’re trying to hit a box that is running SMBv1 (like HTB ‘Lame’) and want to use SMBClient, it’ll fail to connect. The solution is to add the following to the end of your command –option=‘client min protocol=NT1’ like this smbclient //10.10.10.x/ ... More on forum.hackthebox.com
🌐 forum.hackthebox.com
0
March 11, 2020
[PSA] SBM1 Samba protocol has been deprecated, here's a workaround
You can also specify NT1 in that line. [global] client min protocol = NT1 Worked for me. More on reddit.com
🌐 r/archlinux
1
6
May 14, 2020
windows ce - How to enable SMB1 as default and disable SMB2 and SMB3 on Ubuntu 18.04 Server? - Stack Overflow
I want to share files between Ubuntu 18.04 Server and Windows CE. I need to use only SMB1 protocol to connect to Windows CE because this system only supports SMB1. I tried to configure Samba /etc/... More on stackoverflow.com
🌐 stackoverflow.com
Upgraded to Mint 20 - can't mount NAS folders
Might help: https://forums.linuxmint.com/viewtopic.php?f=42&t=322404&p=1831297&hilit=mint+20+samba#p1831297 More on reddit.com
🌐 r/linuxmint
24
53
July 19, 2020
Top answer
1 of 3
14

Disclaimer

The SMBv1 protocol is from the 1983, it is unsecure and thus disabled for a good reason. The SMBv2 protocol has been available since 2006.

Problem Description

I arrived at this question trying to find a solution for the following two problems:

  1. I have an HP printer that can only use the legacy SMBv1 protocol (HP OfficeJet Pro 8620). So my printer refused to connect to the network share and the scan to network feature stopped working.
  2. I tried to use Nautilus to browse the network shares on my own Ubuntu system. And I was getting an error with the message Unable to access location Failed to retrieve share list from server: Invalid Argument:

Solution

After several attempts with different values in the /etc/samba/smb.conf file I was finally able to resolve these problems using these two values:

client min protocol = NT1
server min protocol = NT1

I also found posts that suggested to add this third parameter:

ntlm auth = ntlmv1-permitted

However, on my system this was not necessary.

Explanation

As I understand it, the client min protocol option controls how your system communicates with other SMB servers, changing this option could be useful if your Ubuntu system works as a client and you want to use SMBv1 to access a server. By default (with Samba 4.11) your local Samba installation is configured to require SMBv2 or higher connections.

On the other hand, if your Ubuntu system acts as the server that requires SMBv2 or higher and you have a remote client (such as a printer) that can only understand the legacy SMBv1 protocol, then it seems that changing the client min protocol has no effect. Instead you need to change the server min protocol. This way the client can negotiate SMBv1 with the Samba daemon running on your Ubuntu system.

Side note, you can also pass the client min protocol option to tools such as smbclient, for example:

smbclient -L //<hostname>/<folder> --option='client min protocol=NT1'

Can be used to set the client protocol to SMBv1. This was useful to test the effect of changes in the smb.conf file.

I tried this on Ubuntu 20.04 which comes with samba version 4.11. I have not tested this solution on older Ubuntu distributions.

2 of 3
1

NOTE: This answer relates to version 4.7.6 of samba and for a unique circumstance. Current versions of Samba work differently and setting client max to NT1 would make the max less than the min. To enable SMB1 ( NT1 ) on newer versions of Samba - like the one in Ubuntu 20.04 - use the answer provided by lanoxx below

client max protocol = SMB1

In an attempt to confuse as many people as possible SMB1 in samba is called NT1. So change your line to:

client max protocol = NT1

And don't add the max protocol = SMB1 line at all. If you set up a server on your 18.04 box it will negotiate the right level to use with its clients and by default the upper limit is SMB3. Has been for years.

🌐
Hack The Box
forum.hackthebox.com › htb content › machines
PSA: Fix to SMBv1 smbclient issues - Machines - Hack The Box :: Forums
March 11, 2020 - That means that if you’re trying to hit a box that is running SMBv1 (like HTB ‘Lame’) and want to use SMBClient, it’ll fail to connect. The solution is to add the following to the end of your command –option=‘client min protocol=NT1’ like this smbclient //10.10.10.x/ ...
🌐
Samba
samba.org › samba › security › CVE-2016-2115.html
Samba - Security Announcement Archive
The effective default for this new option is "mandatory". In order to be compatible with more SMB server implementations, the following additional options are introduced: "client ipc min protocol" ("NT1" by default) and "client ipc max protocol" (the highest support SMB2/3 dialect by default).
🌐
Group Policy Administrative Templates
admx.help
client min protocol
See client max protocol for a full list of available protocols. IPC$ connections for DCERPC e.g. in winbindd, are handled by the option. Note that most command line tools support --option='client min protocol=NT1', so it may not be required to enable SMB1 protocols globally in smb.conf.
🌐
nixCraft
cyberciti.biz › nixcraft › howto › samba (smb/cifs) › how to configure samba to use smbv2 and disable smbv1 on linux or unix
How to configure Samba to use SMBv2 and disable SMBv1 on Linux or Unix - nixCraft
May 12, 2021 - I tested on RHEL6 system (samba ... windows client was unable to connect to samba server on linux. SMB1 was disabled on windows server because of security concerns like wannacry. And “max protocol” was not set explicitly on samba server. So “max protocol” was NT1(SMB1) as default. I set “min protocol = ...
Find elsewhere
🌐
Samba
samba.org › samba › history › samba-4.11.0.html
Samba 4.11.0 - Release Notes
Note that most commandline tools e.g. smbclient, smbcacls and others also support the '--option' argument to overwrite smb.conf options, e.g. --option='client min protocol=NT1' might be useful. As Microsoft no longer installs SMB1 support in recent releases or uninstalls it after 30 days without usage, the Samba Team tries to get remove the SMB1 usage as much as possible.
🌐
Reddit
reddit.com › r/archlinux › [psa] sbm1 samba protocol has been deprecated, here's a workaround
r/archlinux on Reddit: [PSA] SBM1 Samba protocol has been deprecated, here's a workaround
May 14, 2020 -

If you get an error while trying to mount an SMB1 samba share and you have no way to upgrade your server for whatever reason (hello Freebox users), do this as per this post:

$ sudo vim /etc/samba/smb.conf

[global] client min protocol = CORE

The error I was getting in Thunar file manager was something along the lines "failed to mount, software caused connection abort".

Hope this helps!

🌐
Samba
lists.samba.org › archive › samba-technical › 2022-October › 137731.html
smbclient --max-protocol=NT1: why it requres setting MIN protocol too?
Ah, that is what I misunderstood, by default smbclient has SMBv1 turned off, but it only has a max protocol switch (which by definition sets the maximum protocol to use and this defaults to SMBv3), when it probably should have been a min protocol switch i.e. turn SMBv1 back on again. The problem with all this is, the user has to know that the server only uses SMBv1 before using smbclient and this isn't always possible to know. Rowland · Previous message (by thread): smbclient --max-protocol=NT1: why it requres setting MIN protocol too?
🌐
Arch Linux Forums
bbs.archlinux.org › viewtopic.php
samba4 protocols [solved] / Networking, Server, and Protection / Arch Linux Forums
Default: client max protocol = SMB3 Example: client max protocol = LANMAN1 client min protocol (G) This setting controls the minimum protocol version that the client will attempt to use. Normally this option should not be set as the automatic negotiation phase in the SMB protocol takes care ...
🌐
Arch Linux Forums
bbs.archlinux.org › viewtopic.php
Samba: how to access both SMB1 as well as SMB2+3 shares? / Networking, Server, and Protection / Arch Linux Forums
November 15, 2017 - If you have clients that only support ... (to the samba server, default is now SMB2 because NT1 has some "slight" security issues...) to make the server support SMBv1-only clients but should seek to get network-wide SMB2 support asap....
🌐
Raspberry Pi Forums
forums.raspberrypi.com › board index › projects › networking and servers
How to run an earlier Samba? - Raspberry Pi Forums
February 7, 2022 - server min protocol = NT1 client min protocol = NT1 ntlm auth = yes It would be better if you learned how to use Samba with SMBv2, SMBv1 is going away, possibly at the 4.17.0 release, but more likely at 4.18.0 You have been warned.
🌐
KDE
phabricator.kde.org › D18878
⚙ D18878 Force NT1 protocol when listing smb:// network [work in progress]
Before samba 4.7, NT1 (smb1) the maximum protocol in libsmbclient, if I'm not mistaken; then they made it possible to connect to smb3 servers without manually rising client max protocol, this and/or badlock fixes broke network discovery via smb://, for now, the only way is to manually force NT1 whaen needed, it's what this patch does.
🌐
SambaWiki
wiki.samba.org › index.php › Samba_4.11_Features_added › changed
Samba 4.11 Features added/changed - SambaWiki
The defaults of 'client min protocol' and 'server min protocol' have been changed to SMB2_02. This means clients without support for SMB2 or SMB3 are no longer able to connect to smbd (by default). It also means client tools like smbclient and other, as well as applications making use of libsmbclient are no longer able to connect to servers without SMB2 or SMB3 support (by default). It's still possible to allow SMB1 dialects, e.g. NT1...
🌐
The Register
theregister.com › 2019 › 07 › 09 › samba_sans_one_smb1
Years late to the SMB1-killing party, Samba finally dumps the unsafe file-sharing protocol version by default • The Register
September 7, 2019 - While the Samba team notes Microsoft's efforts to kill off SMB1, including the loss of support in Windows, the developers also note that there may still be limited cases where the protocol version is necessary, and admins who still need SMB1 are encouraged to send in their feedback. "It's still possible to allow SMB1 dialects, e.g. NT1, LANMAN2, and LANMAN1 for client and server, as well as CORE and COREPLUS on the client," the notes point out. "Note that most command-line tools e.g. smbclient, smbcacls and others also support the --option argument to overwrite smb.conf options,e.g. --option='client min protocol=NT1' might be useful."