Как узнать версию samba windows

3 Answers

Use the smbstatus command from the shell to get an output like this Samba version 3.0.25b-1.el5_1.4

answered Mar 12, 2010 at 20:57

Gomibushi's user avatar

GomibushiGomibushi

1,3131 gold badge12 silver badges21 bronze badges

1

  • +1 but I would run smbstatus --version otherwise you’ll get a lot of output on a busy server.

    Mar 12, 2010 at 21:37

Just enter below command on your terminal

smbd -V

Sven's user avatar

Sven

98.9k15 gold badges180 silver badges226 bronze badges

answered Mar 31, 2015 at 9:21

LOKESH's user avatar

LOKESHLOKESH

3913 silver badges6 bronze badges

4

  • Works! Don’t understand the downvote.

    Nov 8, 2016 at 4:03

  • idk, I just tried this command and it gave me the Linux kernel version if you run it from Ubuntu 16.04

    Apr 20, 2018 at 14:29

  • This command gives the Samba version and not the SMB version. Already upvoted. Maybe someone is misunderstanding the difference between the smbd (Samba daemon) and SMB (Communication protocol).

    Jun 21, 2018 at 3:09

  • I just tried in Debian 9.13 and both smbd -V and smbstatus show exactly the same version, this case Samba version 4.13.13-Debian

    Jun 8, 2022 at 10:22

For the Linux Samba version type :

$ smbstatus -V
Version 4.6.14-SerNet-RedHat-16.el7

But I guess your domain controller needs is the SMB Protocol version you are using, you can find it by typing :

# smbstatus -p
PID     Username     Group        Machine                           Protocol Version  Encryption           Signing
----------------------------------------------------------------------------------------------------------------------------------------
226861  nobody       nogroup      10.0.0.55 (ipv4:10.0.0.55:61866)  SMB3_11           -                    partial(AES-128-CMAC)

 

answered Jul 29, 2022 at 9:44

SebMa's user avatar

SebMaSebMa

3691 silver badge10 bronze badges

You must log in to answer this question.

Not the answer you’re looking for? Browse other questions tagged

  • samba

.

Сетевой протокол SMB (Server Message Block) используется для предоставления совместного удаленного доступа к файлам, принтерам и другим устройствам через порт TCP 445. В этой статье мы рассмотрим: какие версии (диалекты) протокола SMB доступны в различных версиях Windows (и как они соотносятся с версиями samba в Linux); как определить версию SMB на вашем компьютере; и как включить/отключить клиент и сервер SMBv1, SMBv2 и SMBv3.

Содержание:

  • Версии протокола SMB в Windows
  • Как проверить поддерживаемые версии SMB в Windows?
  • Вывести используемые версии SMB с помощью Get-SMBConnection
  • Об опасности использования SMBv1
  • Включение и отключение SMBv1, SMBv2 и SMBv3 в Windows

Версии протокола SMB в Windows

Есть несколько версии протокола SMB (диалектов), которые последовательно появлялись в новых версиях Windows:

Для реализации протокола SMB в Linux/Unix системах используется samba. В скобках мы указали в каких версиях samba поддерживается каждый диалект SMB.

  • CIFS — Windows NT 4.0;
  • SMB 1.0 — Windows 2000;
  • SMB 2.0 — Windows Server 2008 и Windows Vista SP1 (поддерживается в Samba 3.6);
  • SMB 2.1 — Windows Server 2008 R2 и Windows 7 (поддерживается в Samba 4.0);
  • SMB 3.0 — Windows Server 2012 и Windows 8 (поддерживается в Samba 4.2);
  • SMB 3.02 — Windows Server 2012 R2 и Windows 8. 1 (не поддерживается в Samba);
  • SMB 3.1.1 – Windows Server 2016 и Windows 10 (не поддерживается в Samba).

Начиная с версии Samba 4.14, по умолчанию используется SMB2.1.

При сетевом взаимодействии по протоколу SMB между клиентом и сервером используется максимальная версия протокола, поддерживаемая одновременно и клиентом, и сервером.

Ниже представлена сводная таблица, по которой можно определить версию протокола SMB, которая выбирается при взаимодействии разных версий Windows:

Операционная система Win 10, Server 2016 Windows 8.1,
Server 2012 R2
Windows 8,
Server 2012
Windows 7,
Server 2008 R2
Windows Vista,
Server 2008
Windows XP, Server 2003 и ниже
Windows 10 ,

Windows Server 2016

SMB 3.1.1 SMB 3.02 SMB 3.0 SMB 2.1 SMB 2.0 SMB 1.0
Windows 8.1 ,
Server 2012 R2
SMB 3.02 SMB 3.02 SMB 3.0 SMB 2.1 SMB 2.0 SMB 1.0
Windows 8 ,
Server 2012
SMB 3.0 SMB 3.0 SMB 3.0 SMB 2.1 SMB 2.0 SMB 1.0
Windows 7,
Server 2008 R2
SMB 2.1 SMB 2.1 SMB 2.1 SMB 2.1 SMB 2.0 SMB 1.0
Windows Vista,
Server 2008
SMB 2.0 SMB 2.0 SMB 2.0 SMB 2.0 SMB 2.0 SMB 1.0
Windows XP, 2003 и ниже SMB 1.0 SMB 1.0 SMB 1.0 SMB 1.0 SMB 1.0 SMB 1.0

К примеру, при подключении клиентского компьютера с Windows 8.1 к файловому серверу с Windows Server 2016 будет использоваться протокол SMB 3.0.2.

Согласно таблице Windows XP, Windows Server 2003 для доступа к общим файлам и папкам на сервере могут использовать только SMB 1.0, который в новых версиях Windows Server (2012 R2 / 2016) может быть отключен. Таким образом, если в вашей инфраструктуре одновременно используются компьютеры с Windows XP (снятой с поддержки), Windows Server 2003/R2 и сервера с Windows Server 2012 R2/2016/2019, устаревшие клиенты не смогут получить доступ к файлам и папкам на файловом сервере с новой ОС.

Если Windows Server 2016/2012 R2 с отключенным SMB v1.0 используется в качестве контроллера домена, значить клиенты на Windows XP/Server 2003 не смогут получить доступ к каталогам SYSVOL и NETLOGON на контроллерах домена и авторизоваться в AD.

На старых клиентах при попытке подключиться к ресурсу на файловом сервере с отключенным SMB v1 появляется ошибка:

The specified network name is no longer available

Как проверить поддерживаемые версии SMB в Windows?

Рассмотрим, как определить, какие версии протокола SMB поддерживаются на вашем компьютере Windows.

В Windows 10, 8.1 и Windows Server 2019/2016/2012R2 вы можете проверить состояние различных диалектов SMB протокола с помощью PowerShell:

Get-SmbServerConfiguration | select EnableSMB1Protocol,EnableSMB2Protocol

Get-SmbServerConfiguration | select EnableSMB1Protocol,EnableSMB2Protocol

Данная команда вернула, что протокол SMB1 отключен (
EnableSMB1Protocol=False
), а протоколы SMB2 и SMB3 включены (
EnableSMB1Protocol=True
).

Обратите внимание, что протоколы SMBv3 и SMBv2 тесно связаны между собой. Нельзя отключить или включить отдельно SMBv3 или SMBv2. Они всегда включаются/отключаются только совместно, т.к. используют один стек.

В Windows 7, Vista, Windows Server 2008 R2/2008:

Get-Item HKLM:\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters | ForEach-Object {Get-ItemProperty $_.pspath}

Если в данной ветке реестра нет параметров с именами SMB1 или SMB2, значить протоколы SMB1 и SMB2 по умолчанию включены.

проверить какие версии smb включены в windows

Также в этих версиях Windows вы можете проверить, какие диалекты SMB разрешено использовать в качестве клиентов с помощью команд:

sc.exe query mrxsmb10

SERVICE_NAME: mrxsmb10
TYPE : 2 FILE_SYSTEM_DRIVER
STATE : 4 RUNNING
(STOPPABLE, NOT_PAUSABLE, IGNORES_SHUTDOWN)
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0

sc.exe query mrxsmb20

SERVICE_NAME: mrxsmb20
TYPE : 2 FILE_SYSTEM_DRIVER
STATE : 4 RUNNING
(STOPPABLE, NOT_PAUSABLE, IGNORES_SHUTDOWN)
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0

В обоих случаях службы запущены (
STATE=4 Running
). Значит Windows может подключаться как к SMBv1, так и к SMBv2 серверам.

Вывести используемые версии SMB с помощью Get-SMBConnection

Как мы говорили раньше, компьютеры при взаимодействии по протоколу SMB используют максимальную версию, поддерживаемую как клиентом, так и сервером. Для определения версии SMB, используемой для доступа к удаленному компьютеру можно использовать командлет PowerShell
Get-SMBConnection
:

Get-SMBConnection вывести в powershell версии smb, исопльзуемые для подключения

Версия SMB, используемая для подключения к удаленному серверу (ServerName) указана в столбце Dialect.

Можно вывести информацию о версиях SMB, используемых для доступа к конкретному серверу:

Get-SmbConnection -ServerName servername

Если нужно отобразить, используется ли SMB шифрование (появилось в SMB 3.0), выполните:

Get-SmbConnection | ft ServerName,ShareName,Dialect,Encrypted,UserName

В Linux вывести список SMB подключения и используемые диалекты в samba можно командой:

$ sudo smbstatus

Чтобы на стороне сервера вывести список используемых клиентами версий протокола SMB и количество клиентов, используемых ту или иную версию протокола SMB, выполните команду:

Get-SmbSession | Select-Object -ExpandProperty Dialect | Sort-Object -Unique

Get-SmbSession Получить количество клиентов, использующих разные версии SMB

В нашем примере имеется 825 клиентов, подключенных к серверу с помощью SMB 2.1 (Windows 7/Windows Server 2008 R2) и 12 клиентов SMB 3.02.

С помощью PowerShell можно включить аудит версий SMB, используемых для подключения:

Set-SmbServerConfiguration –AuditSmb1Access $true

События подключения затем можно извлечь из журналов Event Viewer с помощью PowerShell:

Get-WinEvent -LogName Microsoft-Windows-SMBServer/Audit

Об опасности использования SMBv1

Последние несколько лет Microsoft из соображений безопасности планомерно отключает устаревший протокол SMB 1.0. Связано это с большим количеством критических уязвимостей в этом протоколе (вспомните историю с эпидемиями вирусов-шифровальщиков wannacrypt и petya, которые использовали уязвимость именно в протоколе SMBv1). Microsoft и другие IT компании настоятельно рекомендуют отказаться от его использования.

Однако отключение SMBv1 может вызвать проблемы с доступом к общий файлам и папкам на новых версиях Windows 10 (Windows Server 2016/2019) с устаревших версий клиентов (Windows XP, Server 2003), сторонних ОС (Mac OSX 10.8 Mountain Lion, Snow Leopard, Mavericks, старые версии Linux), различных старых NAS устройствах.

Если в вашей сети не осталось legacy устройств с поддержкой только SMBv1, обязательно отключайте эту версию диалекта в Windows.

В том случае, если в вашей сети остались клиенты с Windows XP, Windows Server 2003 или другие устройства, которые поддерживают только SMBv1, их нужно как можно скорее обновить или тщательно изолировать.

Включение и отключение SMBv1, SMBv2 и SMBv3 в Windows

Рассмотрим способы включения, отключения различных версий SMB в Windows. Мы рассматриваем отдельно включение клиента и сервера SMB (это разные компоненты).

Windows 10, 8.1, Windows Server 2019/2016/2012R2:

Отключить клиент и сервер SMBv1:
Disable-WindowsOptionalFeature -Online -FeatureName smb1protocol

Отключить только SMBv1 сервер:
Set-SmbServerConfiguration -EnableSMB1Protocol $false

Включить клиент и сервер SMBv1:
Enable-WindowsOptionalFeature -Online -FeatureName smb1protocol

Включить только SMBv1 сервер:
Set-SmbServerConfiguration -EnableSMB1Protocol $true

Отключить сервер SMBv2 и SMBv3:
Set-SmbServerConfiguration -EnableSMB2Protocol $false

Включить сервер SMBv2 и SMBv3:
Set-SmbServerConfiguration -EnableSMB2Protocol $true

Set-SmbServerConfiguration - powershell отключить SMBv2 и SMBv3

Windows 7, Vista, Windows Server 2008 R2/2008:

Отключить SMBv1 сервер:

Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters" SMB1 -Type DWORD -Value 0 –Force

отключить smbv1 сервер в windows 7 через powershell

Включить SMBv1 сервер:
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters" SMB1 -Type DWORD -Value 1 –Force

Отключить SMBv1 клиент:

sc.exe config lanmanworkstation depend= bowser/mrxsmb20/nsi
sc.exe config mrxsmb10 start= disabled

Включить SMBv1 клиент:

sc.exe config lanmanworkstation depend= bowser/mrxsmb10/mrxsmb20/nsi
sc.exe config mrxsmb10 start= auto

Отключить SMBv2 сервер:

Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters" SMB2 -Type DWORD -Value 0 -Force

Включить SMBv2 сервер

Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters" SMB2 -Type DWORD -Value 1 –Force

Отключить SMBv2 клиент:

sc.exe config lanmanworkstation depend= bowser/mrxsmb10/nsi
sc.exe config mrxsmb20 start= disabled

Включить SMBv2 клиент:

sc.exe config lanmanworkstation depend= bowser/mrxsmb10/mrxsmb20/nsi
sc.exe config mrxsmb20 start= auto

Для отключения сервера SMBv1 на всех компьютерах независимо от версии Windows можно распространить параметр реестра типа REG_DWORD с именем SMB1 и значением 0 (HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters)на через GPO.

Для отключения SMBv2 нужно в этой же ветке установить параметр SMB2=0.

Для отключения SMBv1 клиента нужно распространить такой параметр реестра:

  • Key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\mrxsmb10
  • Name: Start
  • Type: REG_DWORD
  • Value: 4

При отключении SMB 1.0/CIFS File Sharing Support в Windows вы можете столкнуться с ошибкой “0x80070035, не найден сетевой путь”, ошибкой при доступе к общим папкам, и проблемами обнаружения компьютеров в сетевом окружении. В этом случае вместо служба обозревателя компьютеров (Computer Browser) нужно использовать службы обнаружения (линк).

SMB или Протоколы блокировки сообщений сервера используются для подключения компьютера к внешнему серверу. Windows 10 поставляется с поддержкой этих протоколов, но они отключены в OOBE. В настоящее время Windows 10 также поддерживает SMBv1, SMBv2 и SMBv3. Разные серверы в зависимости от их конфигурации требуют разных версий SMB для подключения к компьютеру. Но в случае, если вы используете Windows 8.1 или Windows 7, вы можете проверить, включена ли она тоже. Это то, что мы собираемся сделать сегодня.

Содержание

  1. Как проверить версию SMB в Windows
  2. Способы проверки, какая версия SMB установлена ​​на Сервере.
  3. 1] Метод PowerShell
  4. Способы проверить, какая версия SMB установлена ​​на клиентах.
  5. 1] Метод PowerShell

Как проверить версию SMB в Windows

Прежде всего, если у вас Windows 7 , вам не следует отключать SMB v2. Это связано со следующими причинами:

  • Составление запроса – позволяет отправлять несколько запросов SMB 2 как один сетевой запрос
  • Больше чтения и записи – лучшее использование более быстрых сетей
  • Кэширование свойств папок и файлов – клиенты хранят локальные копии папок и файлов
  • Долговечные ручки – позволяют подключению прозрачно переподключаться к серверу при временном отключении
  • Улучшена подпись сообщений – HMAC SHA-256 заменяет MD5 в качестве алгоритма хеширования
  • Улучшенная масштабируемость для обмена файлами – значительно увеличилось количество пользователей, общих ресурсов и открытых файлов на сервер
  • Поддержка символических ссылок
  • Модель аренды клиентских блокировок – ограничивает объем данных, передаваемых между клиентом и сервером, повышает производительность в сетях с высокой задержкой и повышает масштабируемость SMB-серверов.
  • Поддержка большого MTU – для полноценного использования 10-гигабайтного (ГБ) Ethernet
  • Повышенная энергоэффективность – клиенты, которые имеют открытые файлы на сервере, могут спать.

Даже если вы работаете в Windows 8.1 или Windows 10 , вам не следует отключать SMB v3 или SMB v2, поскольку, помимо указанных выше проблем, вы можете столкнуться со следующими проблемами тоже, которые идут с отключением SMB v3:

  • Прозрачное аварийное переключение – клиенты повторно подключаются без перерыва к узлам кластера во время обслуживания или аварийного переключения
  • Scale Out – одновременный доступ к общим данным на всех узлах файлового кластера
  • Многоканальный – агрегирование пропускной способности сети и отказоустойчивости, если доступно несколько путей между клиентом и сервером.
  • SMB Direct – добавляет поддержку сети RDMA для очень высокой производительности, с низкой задержкой и низкой загрузкой процессора
  • Шифрование – обеспечивает сквозное шифрование и защищает от прослушивания в ненадежных сетях.
  • Лизинг каталогов – улучшает время отклика приложений в филиалах за счет кэширования
  • Оптимизация производительности – оптимизация для небольших случайных операций чтения/записи.

Способы проверки, какая версия SMB установлена ​​на Сервере.

Мы будем использовать следующие методы, чтобы проверить, какая версия SMB установлена ​​на вашем компьютере:

  1. Метод PowerShell.
  2. Метод редактора реестра.

1] Метод PowerShell

Если вы хотите проверить, какую версию SMB вы используете, вы можете просто ввести следующую команду в PowerShell:

SMB v1 Windows 10 и Windows 8.1

 Get-WindowsOptionalFeature –Online –FeatureName SMB1Protocol 

SMB v2 для Windows 10 и Windows 8.1

 Get-SmbServerConfiguration | Выберите EnableSMB2Protocol 

SMB v1 для Windows 7

 Get-Item HKLM: \ SYSTEM \ CurrentControlSet \ Services \ LanmanServer \ Parameters | ForEach-Object {Get-ItemProperty $ _. Pspath} 

SMB v2 для Windows 7

 Get-ItemProperty HKLM: \ SYSTEM \ CurrentControlSet \ Services \ LanmanServer \ Parameters | ForEach-Object {Get-ItemProperty $ _. Pspath} 

Если он возвращает значение как True , он включен, иначе отключен.

2] Метод редактора реестра

Введите regedit в поле Начать поиск и нажмите Enter. После открытия редактора реестра перейдите к следующему

 HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Services \ LanmanServer \ Параметры 

Теперь, если у вас есть DWORD с именами SMB1 или SMB2 , проверьте их значения.

Если для него установлено значение 0, оно отключено.

И в любом другом случае он включен.

Способы проверить, какая версия SMB установлена ​​на клиентах.

Мы будем использовать следующие методы, чтобы проверить, какая версия SMB установлена ​​на вашем компьютере:

  1. Метод PowerShell.
  2. Метод редактора групповой политики.

1] Метод PowerShell

Итак, если вы хотите проверить, какая версия SMB вы используете, вы можете просто ввести следующее в командной строке с привилегиями уровня администратора,

SMB v1 Windows 10 и Windows 8.1

 sc.exe qc lanmanworkstation 

SMB v2 для Windows 10 и Windows 8.1

 sc.exe qc lanmanworkstation 

2] Метод редактора групповой политики

Стоит отметить, что этот метод не будет работать в Windows 10 Home или аналогичной редакции Windows 8 или Windows 7.

Откройте окно «Выполнить», введите gpedit.msc и нажмите Enter, чтобы открыть редактор локальной групповой политики. Перейдите по следующему пути:

Конфигурация компьютера> Настройки Windows

В разделе Реестр найдите элемент реестра со следующими свойствами:

Действие: обновление

Улей: HKEY_LOCAL_MACHINE

Путь к ключу: SYSTEM \ CurrentControl \ services \ mrxsmb10

Название значения. Начало

Тип значения: REG_DWORD

Данные о стоимости. 4

Если значение данных установлено в 4, SMB отключен.

Для детального чтения посетите microsoft.com.

Связанное чтение . Почему и как отключить SMB1 в Windows 10/8/7.

3 Answers

Use the smbstatus command from the shell to get an output like this Samba version 3.0.25b-1.el5_1.4

answered Mar 12, 2010 at 20:57

Gomibushi's user avatar

GomibushiGomibushi

1,3131 gold badge12 silver badges21 bronze badges

1

  • +1 but I would run smbstatus --version otherwise you’ll get a lot of output on a busy server.

    Mar 12, 2010 at 21:37

Just enter below command on your terminal

smbd -V

Sven's user avatar

Sven

98.9k15 gold badges180 silver badges226 bronze badges

answered Mar 31, 2015 at 9:21

LOKESH's user avatar

LOKESHLOKESH

3913 silver badges6 bronze badges

4

  • Works! Don’t understand the downvote.

    Nov 8, 2016 at 4:03

  • idk, I just tried this command and it gave me the Linux kernel version if you run it from Ubuntu 16.04

    Apr 20, 2018 at 14:29

  • This command gives the Samba version and not the SMB version. Already upvoted. Maybe someone is misunderstanding the difference between the smbd (Samba daemon) and SMB (Communication protocol).

    Jun 21, 2018 at 3:09

  • I just tried in Debian 9.13 and both smbd -V and smbstatus show exactly the same version, this case Samba version 4.13.13-Debian

    Jun 8, 2022 at 10:22

For the Linux Samba version type :

$ smbstatus -V
Version 4.6.14-SerNet-RedHat-16.el7

But I guess your domain controller needs is the SMB Protocol version you are using, you can find it by typing :

# smbstatus -p
PID     Username     Group        Machine                           Protocol Version  Encryption           Signing
----------------------------------------------------------------------------------------------------------------------------------------
226861  nobody       nogroup      10.0.0.55 (ipv4:10.0.0.55:61866)  SMB3_11           -                    partial(AES-128-CMAC)

 

answered Jul 29, 2022 at 9:44

SebMa's user avatar

SebMaSebMa

3691 silver badge10 bronze badges

You must log in to answer this question.

Not the answer you’re looking for? Browse other questions tagged

  • samba

.

The Server Message Block (SMB) network protocol is used to share and access folders, files, printers, and other devices over network (TCP port 445). In this article, we will look at which versions (dialects) of SMB are available in different versions of Windows (and how they relate to samba versions on Linux); how to check the SMB version in use on your computer; and how to enable or disable the SMBv1, SMBv2, and SMBv3 dialects.

Contents:

  • SMB Protocol Versions in Windows
  • How to Check SMB Version on Windows?
  • Checking Used SMB Dialects with Get-SMBConnection
  • Stop Using the Insecure SMBv1 Protocol
  • How to Enable and Disable SMBv1, SMBv2, and SMBv3 on Windows?

SMB Protocol Versions in Windows

There are several versions of the SMB protocol (dialects) that have consistently appeared in new Windows versions (and samba) :

  • CIFS – Windows NT 4.0
  • SMB 1.0 – Windows 2000
  • SMB 2.0 – Windows Server 2008 and Windows Vista SP1 (supported in Samba 3.6)
  • SMB 2.1 – Windows Server 2008 R2 and Windows 7 (Samba 4.0)
  • SMB 3.0 – Windows Server 2012 and Windows 8 (Samba 4.2)
  • SMB 3.02 – Windows Server 2012 R2 and Windows 8.1 (not supported in Samba)
  • SMB 3.1.1 – Windows Server 2016 and Windows 10 (not supported in Samba)

Samba is used to implement the SMB protocol in Linux/Unix . Samba 4.14 and newer uses SMB 2.1 by default.

In SMB network communication, the client and server use the maximum SMB protocol version supported by both the client and the server.

The summary table of SMB version compatibility looks like this. Using this table, you can determine the version of the SMB protocol that is selected when different versions of Windows interact:

Operating System Windows 10, Win Server 2016 Windows 8.1, Win Server 2012 R2 Windows 8,Server 2012 Windows 7,Server 2008 R2 Windows Vista,Server 2008 Windows XP, Server 2003 and earlier
Windows 10, Windows Server 2016 SMB 3.1.1 SMB 3.02 SMB 3.0 SMB 2.1 SMB 2.0 SMB 1.0
Windows 8.1, Server 2012 R2 SMB 3.02 SMB 3.02 SMB 3.0 SMB 2.1 SMB 2.0 SMB 1.0
Windows 8, Server 2012 SMB 3.0 SMB 3.0 SMB 3.0 SMB 2.1 SMB 2.0 SMB 1.0
Windows 7, Server 2008 R2 SMB 2.1 SMB 2.1 SMB 2.1 SMB 2.1 SMB 2.0 SMB 1.0
Windows Vista, Server 2008 SMB 2.0 SMB 2.0 SMB 2.0 SMB 2.0 SMB 2.0 SMB 1.0
Windows XP, 2003 and earlier SMB 1.0 SMB 1.0 SMB 1.0 SMB 1.0 SMB 1.0 SMB 1.0

For example, if a client computer running Windows 8.1 connects to a file server with Windows Server 2016, the SMB 3.0.2 protocol will be used.

According to the table, Windows XP and Windows Server 2003 can use only SMB 1.0 to access shared folders and files. The SMBv1 is disabled in newer versions of Windows Server (2012 R2/2016). So, if you are still using Windows XP and Windows Server 2003 devices on your network, they won’t be able to access shared folders on the file server running Windows Server 2016.

If Windows Server 2019/2016 with disabled SMB v1.0 is used as a domain controller, then Windows XP/Server 2003 clients won’t be able to access the SYSVOL and NETLOGON folders on domain controllers and authenticate with AD.

You may receive the following error when trying to connect to a shared folder on a file server with SMBv1 disabled:

The specified network name is no longer available

How to Check SMB Version on Windows?

Let’s look on how to find out which versions of the SMB are enabled on your Windows device.

On Windows 10/8.1 and Windows Server 2019/2016/2012R2, you can check the status of various dialects of the SMB protocol using PowerShell:

Get-SmbServerConfiguration | select EnableSMB1Protocol,EnableSMB2Protocol

How to check which SMB version is enabled on Windows with PowerShell

This command returned that the SMB1 protocol is disabled (EnableSMB1Protocol = True), and the SMB2 and SMB3 protocols are enabled (EnableSMB1Protocol = False).

Note that the SMBv3 and SMBv2 protocols are closely related. You cannot disable or enable SMBv3 or SMBv2 separately. They are always enabled/disabled only together because they share the same stack.

On Windows 7, Vista, and Windows Server 2008 R2/2008:

Get-Item HKLM:\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters | ForEach-Object {Get-ItemProperty $_.pspath}

If there are no parameters named SMB1 or SMB2 in this registry key, then the SMBv1 and SMBv2 protocols are enabled by default.

Checking smb version on Windows 7 SP1

Also on these Windows versions, you can check which SMB client dialects are allowed to connect to remote hosts:

sc.exe query mrxsmb10

SERVICE_NAME: mrxsmb10
TYPE : 2 FILE_SYSTEM_DRIVER
STATE : 4 RUNNING
(STOPPABLE, NOT_PAUSABLE, IGNORES_SHUTDOWN)
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0

sc.exe query mrxsmb20

SERVICE_NAME: mrxsmb20
TYPE : 2 FILE_SYSTEM_DRIVER
STATE : 4 RUNNING
(STOPPABLE, NOT_PAUSABLE, IGNORES_SHUTDOWN)
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0

In both cases, the services are running (STATE = 4 Running). This means that the current Windows device can connect to both SMBv1 and SMBv2 hosts.

Checking Used SMB Dialects with Get-SMBConnection

When communicating over SMB, computers use the maximum SMB version supported by both the client and the server. The Get-SMBConnection PowerShell cmdlet can be used to check the SMB version used to access a remote computer:

How to find out what SMB dialect is in use using Get-SmbConnection cmdlet

The SMB version used to connect to the remote server (ServerName) is listed in the Dialect column.

You can display information about the SMB versions used to access a specific server:

Get-SmbConnection -ServerName srvfs01

If you want to display if SMB encryption is in use (introduced in SMB 3.0):

Get-SmbConnection | ft ServerName,ShareName,Dialect,Encrypted,UserName

On Linux, you can display a list of SMB connections and used dialects in samba using the command:

$ sudo smbstatus

On the Windows SMB server side, you can display a list of the versions of the SMB protocols that the clients are currently using. Run the command:

Get-SmbSession | Select-Object -ExpandProperty Dialect | Sort-Object -Unique

Get-SmbSession used Dialect versionsIn this example, there are 898 clients connected to the server using SMB 2.1 (Windows 7/ Windows 2008 R2) and 8 SMB 3.02 clients.

You can use PowerShell to enable auditing of the SMB versions used for the connection:

Set-SmbServerConfiguration –AuditSmb1Access $true

SMB connection events can then be exported from Event Viewer logs:

Get-WinEvent -LogName Microsoft-Windows-SMBServer/Audit

Stop Using the Insecure SMBv1 Protocol

Over the past few years, Microsoft has systematically disabled the legacy SMB 1.0 protocol in all products for security reasons. This is due to the large number of critical vulnerabilities in this protocol (remember the incidents with wannacrypt and petya ransomware, which exploited a vulnerability in the SMBv1 protocol). Microsoft and other IT companies strongly recommend that you stop using SMBv1 in your network.

However, disabling SMBv1 can cause problems with accessing shared files and folders on newer versions of Windows 10 (Windows Server 2016/2019) from legacy clients (Windows XP, Windows Server 2003), third-party OS (Mac OSX 10.8 Mountain Lion, Snow Leopard, Mavericks, old Linux distros), old NAS devices.

If there are no legacy devices left on your network that support only SMBv1, be sure to disable this SMB dialect in Windows.

If you have clients running Windows XP, Windows Server 2003, or other devices that only support SMBv1, they should be updated or isolated.

How to Enable and Disable SMBv1, SMBv2, and SMBv3 on Windows?

Let’s look at ways to enable and disable different SMB versions on Windows. We’ll cover SMB client and server management (they are different Windows components).

Windows 10, 8.1, and Windows Server 2019/2016/2012R2:

Disable SMBv1 client and server:

Disable-WindowsOptionalFeature -Online -FeatureName smb1protocol

Disable SMBv1 server only:

Set-SmbServerConfiguration -EnableSMB1Protocol $false

Enable SMBv1 client and server:

Enable-WindowsOptionalFeature -Online -FeatureName smb1protocol

Enable only SMBv1 server:

Set-SmbServerConfiguration -EnableSMB1Protocol $true

Disable SMBv2 and SMBv3 server:

Set-SmbServerConfiguration -EnableSMB2Protocol $false

Enable SMBv2 and SMBv3 server:

Set-SmbServerConfiguration -EnableSMB2Protocol $true

Dsable smb2 using set-smbserverconfiguration cmdlet

Windows 7, Vista, and Windows Server 2008 R2/2008:

Disable SMBv1 server:

Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters" SMB1 -Type DWORD -Value 0 –Force

How to disable SMB 1 on Windows 7 via registry?

Enable SMBv1 server:

Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters" SMB1 -Type DWORD -Value 1 –Force

Disable SMBv1 client:

sc.exe config lanmanworkstation depend= bowser/mrxsmb20/nsi
sc.exe config mrxsmb10 start= disabled

Enable SMBv1 client:

sc.exe config lanmanworkstation depend= bowser/mrxsmb10/mrxsmb20/nsi
sc.exe config mrxsmb10 start= auto

Disable SMBv2 server:

Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters" SMB2 -Type DWORD -Value 0 -Force

Enable SMBv2 server:

Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters" SMB2 -Type DWORD -Value 1 –Force

Disable SMBv2 client:

sc.exe config lanmanworkstation depend= bowser/mrxsmb10/nsi
sc.exe config mrxsmb20 start= disabled

Enable SMBv2 client:

sc.exe config lanmanworkstation depend= bowser/mrxsmb10/mrxsmb20/nsi
sc.exe config mrxsmb20 start= auto

You can disable SMBv1 server on domain joined computers by deploying the following registry parameter through the GPO:

  • Key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters
  • Name: SMB1
  • Type: REG_DWORD
  • Value: 0

Set the registry parameter SMB2=0 in order to disable the SMBv2 server.

To disable the SMBv1 client, you need to propagate the following registry setting:

  • Key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\mrxsmb10
  • Name: Start
  • Type: REG_DWORD
  • Value: 4

  • Как узнать версию windows если система не запускается
  • Как узнать версию биос в windows 10 в биос
  • Как узнать версию python на windows
  • Как узнать активирована ли windows 10 pro или нет
  • Как узнать время включения и выключения компьютера windows 10