My testing with Nessus has indicated SMBv1 is only disabled when setting

min protocol = SMB2

in the [global] section of smb.conf . Core, LANMAN2 and NT1 were all still flagged as being vulnerable.

Answer from Christian M. on askubuntu.com
🌐
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 - Fig.01: How to force SMB2 protocol ... Save and close the file. client min protocol – This setting controls the minimum protocol version that the client will attempt to use....
Discussions

networking - Set SMB2 protocol in Samba 3.6.6 - Unix & Linux Stack Exchange
I've decided to switch to the higher version of SMB in Samba (at least 2) - mostly because of the security reasons. I've tried to add to the smb.conf in the [global] section: client min protocol = SMB2 client max protocol = SMB3 server min protocol = SMB2 More on unix.stackexchange.com
🌐 unix.stackexchange.com
November 7, 2018
[Question] Set preferred samba protocol version
Current versions of samba should default to smb protcol version 3.11 without any enforced config and smb verson 1 is disabled by default and obsolete with samba. That mentioned there are some desirable settings you can set in smb.conf globally. I've been using the generic standalone config below for several years for a samba server that is not used as a cups print server or with ldap user auth or as an ADC. [global] server string = hostname client NTLMv2 auth = Yes load printers = No printcap name = /dev/null local master = no ldap ssl = no ea support = Yes smb encrypt = desired You can view your samba user connection status by typing smbstatus as the root user and that will display the smb version used as well as encryption algorithm used. Currently my system is using samba 4.11.11 More on reddit.com
🌐 r/linuxquestions
2
6
August 12, 2020
Solved - Per-host "min protocol" in samba? | The FreeBSD Forums
I've recently set our samba server at work to use "server min protocol = SMB2", as some of our Windows clients were using older dialects to communicate. Samba 4.10 (and possibly earlier versions) seem to have some issues with the older standards, and there are security benefits to having this... More on forums.freebsd.org
🌐 forums.freebsd.org
October 7, 2019
debian - smb.conf min protocol = SMB2 timeouts from remote (local network) machine - Unix & Linux Stack Exchange
I've tried to include min protocol = SMB2 to improve the security of my local Linux machines. But when I do this, I get time out from within KDE and Operation Not Supported from CLI. Removing the min protocol stipulation resolves this issue. Any idea why? ... Load smb config files from /etc/samba/... More on unix.stackexchange.com
🌐 unix.stackexchange.com
Top answer
1 of 1
16

From the man page for the configuration file for the Samba suite in the "client max protocol" section:

Possible values are :

  • CORE: Earliest version. No concept of user names.
  • COREPLUS: Slight improvements on CORE for efficiency.
  • LANMAN1: First modern version of the protocol. Long filename support.
  • LANMAN2: Updates to Lanman1 protocol.
  • NT1: Current up to date version of the protocol. Used by Windows NT. Known as CIFS.
  • SMB2: Re-implementation of the SMB protocol. Used by Windows Vista and later versions of Windows. SMB2 has sub protocols available.
  • SMB2_02: The earliest SMB2 version.
  • SMB2_10: Windows 7 SMB2 version.
  • SMB2_22: Early Windows 8 SMB2 version.
  • SMB2_24: Windows 8 beta SMB2 version.

By default SMB2 selects the SMB2_10 variant.

  • SMB3: The same as SMB2. Used by Windows 8. SMB3 has sub protocols available.
  • SMB3_00: Windows 8 SMB3 version. (mostly the same as SMB2_24)
  • SMB3_02: Windows 8.1 SMB3 version.
  • SMB3_10: early Windows 10 technical preview SMB3 version.
  • SMB3_11: Windows 10 technical preview SMB3 version (maybe final).

By default SMB3 selects the SMB3_11 variant.

Normally this option should not be set as the automatic negotiation phase in the SMB protocol takes care of choosing the appropriate protocol.

The value default refers to SMB3_11.

Adding clarification from A.B in the comments:

wiki.samba.org/index.php/Samba3/SMB2 states "Samba 3.6 added basic support for SMB2.0", "Basic support for SMB 2.1 was added in Samba 4.0.0", "Basic support for SMB3 is included in Samba 4.0.0 and later."

🌐
Gen
support.gen.uk › kb › faq.php
Setting SMB Versions in Samba Server - GEN HelpDesk
- client … protects any outbound connections Samba makes (e.g. to a Windows DFS or a backup target). ... [global] # ----- Server side ----- server min protocol = SMB2 # reject SMB1 (CIFS) server max protocol = SMB3_11 # use the latest SMB3 version you support # ----- Client side ----- client min protocol = SMB2 client max protocol = SMB3_11
Top answer
1 of 2
1

SLES 11.4 is old enough for its Samba to default to SMBv1 only. You've set both client min protocol and client max protocol, which only affect Samba when it's acting as a client, like smbclient.

For server-side, you've only set server min protocol, so the server max protocol is still defaulting to SMBv1. And because now min protocol is higher than max, smbd actually cannot allow any protocol at all.

The facts that SLES 11.4's Samba is so old and its SMBv3 support seems to be buggy (as you discovered) caused us to make it a priority at work to upgrade any Samba servers that were still running SLES 11.4 to SLES 12 or newer.

2 of 2
0

running Samba-3.6.3 in SLES 11.4 which has kernel 3.0, my global section is this and I know SMB2 works because windows 10 client will NOT connect via SMB1 the minimum is SMB2 for win10 out of the box.

Note that if you set Min Protocol = SMB2 then if your clients are Windows 7 it will not work for them... at least i did not figure it out troubleshooting on the windows side I think for Win7 it is default SMB1 unless you manually configure something in win7 to say do SMB2.

And for whatever reason setting max protocol = SMB3 caused things not to work for me thus I have SMB2 specified.

[global]
    min protocol = SMB2
    max protocol = SMB2
    workgroup = workgroup
    passdb backend = tdbsam
    map to guest = Never
    usershare allow guests = No
    add machine script = /usr/sbin/useradd  -c Machine -d /var/lib/nobody -s /bin/false %m$
    domain master = No
    security = user
    wins support = No
    server signing = auto
    name resolve order = lmhosts bcast host
    printing = bsd
    printcap name = /dev/null
    log level = 2 auth:10 auth_audit:3 auth_json_audit:3 winbind:5
    max log size = 1000000

and a sample of a share that i use

[data1]
    create mask = 660
    directory mask = 770
    inherit acls = Yes
    path = /data1
    read only = No

you should not need to do anything in /etc/fstab other than mounting your storage resource as you normally would. Then once mounted make sure access permissions of that folder... chmod 777 /data1 in my example, are open for starters, then when working go ahead and remove world permissions and change group ownership and permissions as you need.

🌐
Samba
lists.samba.org › archive › samba › 2019-July › 224586.html
[Samba] client min protocol = SMB2
July 22, 2019 - > > EdG > > Le 22/07/2019 à 11:57, Rowland penny via samba a écrit : >> On 22/07/2019 15:51, Edouard Guigné via samba wrote: >>> I did not set max protocol to SMB2 in smb.cnf, I don't want to force >>> SMB2 selection if SMB3 can be used by a client. >>> >>> The machine is a Windows 7, so is SMB2 compliant. >>> >> If the Win 7 machine is connecting to a share on a Unix domain >> member, it is connecting to a 'server' not a 'client' >> >> So, set 'server min protocol = SMB2_02' as well >> >> Rowland >> >> >> >
Find elsewhere
🌐
Reddit
reddit.com › r/linuxquestions › [question] set preferred samba protocol version
r/linuxquestions on Reddit: [Question] Set preferred samba protocol version
August 12, 2020 -

There are multiple SMB protocol versions that can be set used, by editing /etc/samba/smb.conf

[global]
    min protocol = SMB2

I can set a minimum, and maximum version for my system. However, this could leave a range of versions that are actually used.

Is it possible to set a preferred version, which is used if both the client and server support this version?
Or is there a way to get SMB to use the latest compatible version, not the minimum (seeing as it defaults to version 1.0)?

🌐
Ixsystems
redmine.ixsystems.com › issues › 24334
Bug #24334: SBM server errors using min protocol SMB2 - FreeNAS - iXsystems & FreeNAS Redmine
March 11, 2020 - Windows 2008 clients seem use a maximum version of SMBv2.02, version SMBv2.10 appears to not be implemented. Setting the FreeNAS server to "SMB2_02" for the minimum protocol fixed the issue with Windows clients, and Linux clients can also mount the share with the "vers=2.0" option.
🌐
Samba
samba.org › samba › docs › current › man-html › smb.conf.5.html
smb.conf
The minimum value of this parameter is clamped at 1 second. ... This parameter specifies whether Samba should fork the async smb echo handler. It can be beneficial if your file system can block syscalls for a very long time. In some circumstances, it prolongs the timeout that Windows uses to ...
🌐
FreeBSD
forums.freebsd.org › server and networking › web and network services
Solved - Per-host "min protocol" in samba? | The FreeBSD Forums
October 7, 2019 - In /usr/local/etc/smb4.conf: [global] include = /usr/local/etc/samba/%m.conf server min protocol = SMB2 # ... % cat /usr/local/etc/samba/1.2.3.4.conf # copier specific config [global] server min protocol = LANMAN1 ...followed by a # smbcontrol all reload-config.
🌐
Stack Exchange
unix.stackexchange.com › questions › 381175 › smb-conf-min-protocol-smb2-timeouts-from-remote-local-network-machine
debian - smb.conf min protocol = SMB2 timeouts from remote (local network) machine - Unix & Linux Stack Exchange
I've tried to include min protocol = SMB2 to improve the security of my local Linux machines. But when I do this, I get time out from within KDE and Operation Not Supported from CLI. Removing the min protocol stipulation resolves this issue. Any idea why? ... Load smb config files from /etc/samba/smb.conf Processing section "[homes]" Processing section "[msc_media_public]" Processing section "[msc_media_personal]" Processing section "[printers]" Processing section "[print$]" Loaded services file OK.
🌐
Total Commander
ghisler.ch › home › index › total commander › total commander (english)
Cannot connect to SMB server when min protocol = SMB2 is set - Page 2 - Total Commander
[global] workgroup = WORKGROUP server string = Samba Server %v netbios name = xxxyyy security = user map to guest = bad user dns proxy = no max protocol = SMB3 min protocol = SMB2_10 client max protocol = SMB3 client min protocol = SMB2_10 #============================ Share Definitions ============================== [S_Secured] path = /var/samba_share valid users = abcduser guest ok = no writable = yes browsable = yes I'm not quite sure, but only "SMB2_10" worked for me.
🌐
Samba
lists.samba.org › archive › samba › 2017-May › 208322.html
[Samba] browsing problem with minimum protocol SMB2
May 20, 2017 - The same thing from a linux client: smbclient -L {PDC} -m SMB2 Domain=[{MYDOMAIN}] OS=[] Server=[] Server Comment --------- ------- Workgroup Master --------- ------- I.E. there's no information - The Server and Workgroup lists are empty. I can see information going into wins.dat and browse.dat, though. If I set the PDCs min protocols to NT1, I get: smbclient -L {PDC} Domain=[{MYDOMAIN}] OS=[Windows 6.1] Server=[Samba 4.3.11-Ubuntu] (list of hosts follows) Workgroup Master --------- ------- {OTHER_GROUP} {GROUP_MASTER} (etc) What I do to set the minimum in my smb.conf is: server min protocol =
🌐
Linux Mint Forums
forums.linuxmint.com › board index › main edition support › networking
[Solved] Samba issue - Linux Mint Forums
December 17, 2021 - Weak crypto is allowed Server role: ROLE_STANDALONE client ipc max protocol = default client ipc min protocol = default client max protocol = default client min protocol = SMB2_02 server max protocol = SMB3 server min protocol = SMB2_02 jack@rz7:~$ ssh pi4 "testparm -sv | grep 'protocol'" Load smb config files from /etc/samba/smb.conf Loaded services file OK.
🌐
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 - Eventually I found a workaround: https://superuser.com/questions/1226973 … lt-to-smb3 If I add the following to /etc/samba/smb.conf on the client (!) it works: client min protocol = SMB2 ; default is 'CORE' (MS-DOS era) client max protocol = SMB3 ; default is 'NT1' (aka CIFS)