Поддержка smb2 в windows server 2003

Сетевой протокол 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) нужно использовать службы обнаружения (линк).

Не могу подключиться c windows server 2003 R2 к общим папкам на Windows server 2019

0

YFedor

27.07.23

09:37

На Сервер 2016 расшарены общие папки — с вин 2003 подключение нормально

На Сервер 2019 расшарены общие папки — с вин 2003 нет подключения, набираешь \\ИмяСервераВин2019 — пишет нет доступа,

ИмяСервераВин2019 пингуется с Вин 2003

На сервере с вин 2019 брандмауер выключен (т.е. служба работает, но в настройках указано, что для этого подключения он выключен.

1

YFedor

27.07.23

09:40

набираешь \\ИмяСервераВин2019 — пишет нет доступа — вернее не так — «Не удается найти \\ИмяСервераВин2019»

2

shuhard

27.07.23

09:41

(1) сделай net use  по IP

3

YFedor

27.07.23

09:43

(2) \\айпиСервераСВин2019 тоже выдает не удается найти \\…

4

shuhard

27.07.23

09:45

(3) ещё раз, net use — не требует брокастингов

5

Asmody

27.07.23

09:46

6

eklmn

27.07.23

09:47

Windows Server 2003 is going away

The last supported Windows operating system that can only negotiate SMB1 is Windows Server 2003. All other currently supported Windows operating systems (client and server) are able to negotiate SMB2 or higher. Windows Server 2003 support will end on July 14 of this year, as you probably heard

7

YFedor

27.07.23

09:47

(4) Так не видит же \\айпиСервераСВин2019.

Но я попробовал — ошибка — указанное сетевое имя более недоступно

8

Asmody

27.07.23

09:47

9

shuhard

27.07.23

09:48

(7) скрипт покажи

10

YFedor

27.07.23

09:48

(6) Ну и что? Там же написано, что вин 2003 последний, поддерживающий СМВ1, но на вин 2008 шара есть и она видна с вин 2003

11

Asmody

27.07.23

09:49

(10) на 2019 SMBv1 не включен

12

YFedor

27.07.23

09:49

(9) net use Z: «\\MyDomainName.local\Documents\Обменник»

13

eklmn

27.07.23

09:50

(11) он нас не слышит…

14

Asmody

27.07.23

09:51

(13) да похер

15

eklmn

27.07.23

09:51

(14) согласен

16

shuhard

27.07.23

09:52

(12) сделай net use  по IP

17

YFedor

27.07.23

09:53

(16) Та же фигня будет

Действительно, на серверах с Вин2019 отключен СМВ1.

Тогда вопрос: а на Вин 2003 можно включить СМВ2?

18

Asmody

27.07.23

10:06

(17) я же дал ссылку вверху от самого Микрософта. Там вроде все даже по-русски написано

19

shuhard

27.07.23

10:25

(18) чукча не читатель (с)

20

Chai Nic

27.07.23

10:33

На новых виндах даже при включенном SMB1 не всё работает, в частности реальны проблемы с доступом к расшаренным на старых машинах принтерам.

21

YFedor

27.07.23

11:02

(18), (19) Там написано, как включить SMB1 на новых версиях Windows, а не то, что мне нужно в (17), так что да, чукча не читатель (с)

22

Chai Nic

27.07.23

11:05

(21) «а на Вин 2003 можно включить СМВ2?»

Нет

23

YFedor

27.07.23

11:09

(22) Ни Сервер, ни клиент?

24

Asmody

27.07.23

11:23

(23) нет. не поддерживается в 2003 ничего. в (6) же написаны официальные слова Микрософта: «идите нахер со своим 2003»

25

Asmody

27.07.23

11:27

26

Chai Nic

27.07.23

11:39

В порядке творческой инициативы, можно попробовать скомпилировать самбу новых версий под винду, и заменить ей штатные службы)

27

stix2010

27.07.23

12:25

(0) непонятно зачем столько шар

Microsoft Windows Server 2003 and 2008 R2 enable SMB encryption for both client computers and file shares. This article will teach you how to properly configure this feature on your server, allowing it to encrypt all data sent between clients as well as the files that are stored within a share.

The “enable smb encryption windows 10” is a question that has been asked before. If you are using Windows 10, you can enable SMB encryption by following these steps: Open the File Explorer, click on This PC, and then double-click on the network adapter to which your computer is connected.

Using Server Manager, enable SMB Encryption.

  1. Open File and Storage Services in Server Manager.
  2. To access the Shares management page, choose Shares.
  3. Select Properties from the context menu of the share on which you wish to activate SMB Encryption.
  4. Select Encrypt data access from the share’s Settings page.

I was also curious whether SMB is encrypted by default.

SMB encryption is disabled by default when you establish an SMB server on the storage virtual machine (SVM). The SMB client must support SMB encryption in order to create an encrypted SMB session. SMB encryption is supported by Windows clients beginning with Windows Server 2012 and Windows 8.

Is Windows file sharing encrypted as well? By default, Windows protects file sharing connections with 128-bit encryption. Some gadgets don’t support 128-bit encryption, so you’ll have to settle with 40- or 56-bit encryption. To modify the file sharing encryption level, you must be logged in as an administrator.

Should SMB Signing be enabled in this case?

SMB signature is supported by all Windows versions, so you may set it up on any of them. SMB signature, on the other hand, must be enabled on both machines in the SMB connection for it to operate. In the following versions, SMB signing is enabled by default for outgoing sessions.

What does SMB security entail?

The Server Message Block Protocol (SMB protocol) is a client-server communication protocol for sharing network resources like as files, printers, and serial ports. It can also carry interprocess communication transaction protocols.

Answers to Related Questions

Is SMB communication on Windows encrypted?

SMB 3.0 includes traffic encryption. It was possible to encrypt data transported over the network between the SMB file server and the clients in the version of the Server Message Block (SMB) 3.0 protocol released in Windows Server 2012 / Windows 8. SMB 3.1 is the most recent version.

What is the SMB port?

As a result, in order to communicate with other systems, SMB needs network ports on a computer or server. IP port 139 or 445 are used by SMB. SMB was initially built on top of NetBIOS and used port 139.

Is SMB safe to use on the internet?

SMB outbound isn’t allowed by most firms, therefore it won’t function in a lot of cases. If you need access to a file share, either use a VPN or something like owncloud/nextcloud to connect to the network first. If you don’t worry about “what may go wrong,” every service on the internet is safe.

Is CIFS safe to use?

To meet your business security requirements for SMB access, you can set the CIFS server minimum security level, also known as the LMCompatibilityLevel, on your CIFS server. You can enable AES-256 and AES-128 encryption on the CIFS server to take advantage of the highest security with Kerberos-based communication.

Is the traffic on NFS encrypted?

There are three options. It is secure if you use NFSv4 with sec=krb5p. (That is, for authentication, use Kerberos 5 and encrypt the connection for privacy.) However, if you use NFS v3 or NFS v4 with sys=system, it’s not at all secure.

Is Samba safe to use?

Samba is secure because it encrypts passwords (it can be set to use cleartext, but that would be bad), but data is not encrypted by default. Samba can be built with SSL support, but you’ll need to find a client that does since Windows doesn’t support SMB over SSL.

What is the purpose of SMB in Windows?

The Server Message Block (SMB) protocol is a network file sharing protocol that enables computer applications to read and write files as well as request services from server programs on a network. The SMB protocol may be used in conjunction with other network protocols such as TCP/IP.

In Windows Server 2012, how can I encrypt a file?

To encrypt a file or folder, follow these steps:

  1. Select Programs or All Programs from the Start menu, then Accessories, and finally Windows Explorer.
  2. Right-click the file or folder you wish to encrypt, then choose Properties from the context menu.
  3. Select Advanced from the General menu.
  4. To safeguard data, check Encrypt contents.

What does it mean that SMB signing isn’t required?

This system supports SMB signing but does not need it. SMB signature enables the receiver of SMB packets to verify their validity, preventing man-in-the-middle attacks. SMB signature may be set up in three ways: completely disabled (least secure), enabled, or needed (most secure).

Why is SMB signing necessary?

Overview of SMB Signing

The receiver of the packets may validate the packets’ location of origin and validity by digitally signing them. The SMB protocol includes a security mechanism that helps prevent packet tampering and “man in the middle” attacks.

Is SMB signing necessary?

Both machines in the SMB connection must support SMB signing when SMB signing is necessary. If one of the computers does not support SMB signing, the SMB connection will fail. On the following operating systems, SMB signing is enabled by default for outgoing SMB sessions: Windows Server 2003 is a server operating system.

What’s the difference between smb1 and smb2?

The main distinction is that SMB2 (and now SMB3) is a more secure version of SMB. It’s essential for secure conversations across a channel. The DirectControl agent (adclient) employs NTLM authentication to download Group Policy.

What is the best way to transfer files to a Windows server?

Dedicated Windows Servers

Remote Desktop is the simplest and most secure technique to transmit data between the server and your machine. Search for Remote Desktop Connection in the Start menu on your PC. Select Show Options from the Remote Desktop Connection menu. Click More under the Local Resources tab.

Is 128-bit encryption supported by Windows 10?

The user can share his locally connected printers and stored files with other users over the network with Windows 10. By default, Windows protects file sharing connections with 128-bit encryption. Some gadgets don’t support 128-bit encryption, so you’ll have to settle with 40- or 56-bit encryption.

How can I use file sharing to transfer files?

Using the Cloud to Transfer Files

This may be accomplished by sharing the file with any Windows software that supports cloud storage services such as OneDrive or Google Drive. Simply right-click the file you wish to send and choose Share. You’ll find a selection of Windows programs to pick from at the bottom of the Share box.

What is the purpose of encrypting a folder?

Encryption is a technique for making sensitive data more secure and less likely to be intercepted by someone who aren’t supposed to see it. To safeguard sensitive electronic data, such as emails, files, folders, and whole drives, numerous current methods of encryption are utilized.

Is BitLocker capable of encrypting data in transit?

When reading and writing data, BitLocker does not encrypt and decrypt the whole disk. The encrypted sectors on a BitLocker-protected disc are only decrypted when system read operations request them. Before being written to the actual disk, the system encrypts the blocks that are written to it.

The “enable smb encryption group policy” is a way to enable SMB encryption. This can be done by editing the Group Policy in Computer Configuration > Administrative Templates > Network > Windows Firewall with Advanced Security > Inbound Rules.

If you have an existing Windows 2008 R2 or Windows 2012 R2 file server and would like to add an alternate name or alias for file share access, an SMB alias needs to be created.

Example: Your existing server is named: server1 and has a fully qualified domain name of server1.mydomain.local. You would like to be able to access file shares on the server as: \\server1 as well as \\fileserver.

In previous version of Windows 2000 and 2003, a registry setting was all that was required in order to enable SMB aliasing, see Microsoft KB281308, but this only works with SMB 1.0 and not SMB 2.0. Computers that run Windows Server 2008, Windows Server 2008 R2, Windows Vista, and Windows 7 support both SMB 1.0 and SMB 2.0. Windows includes an SMB client component (Client for Microsoft Windows) and an SMB server component (File and Printer Sharing for Microsoft Windows). By default, SMB 2.0 is the file sharing protocol that is used when both client and server support it. For more information on SMB 2.0 click here.

To add a SMB alias in Windows 2008 R2 which supports SMB 2.0, do as follows:

1. Add a CNAME record in your DNS pointing at the primary server name, e.g. fileserver.mydomain.local CNAME server1.mydomain.local.

2. Open the Registry Editor (regedit) on the server and browse to: HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanmanServer\Parameters

3. Add a new REG_DWORD 32bit entry using the edit menu.

Value name: DisableStrictNameChecking
Data type : REG_DWORD
Radix : Decimal
Value : 1

4. Exit the registry editor then reboot your server.

5. Once the server reboots you need to add a Service Principal Name (SPN) as follows:

a. Open the command prompt.

b. Type: setspn -a host/fileserver server 1 (where ‘server1’ is the primary name of your server and ‘fileserver’ is the alternate name)

b. Type: setspn -a host/fileserver.mydomain.local server1 (where fileserver.mydomain.local is the fully qualified domain name alias and server1 is the primary name of your server)

Example:

setspn -a host/<NEW_CNAME_Server> <NetBIOS_Name_Server>

setspn -a host/<NEW_CNAME_FQDN_Server> <NetBIOS_Name_Server>

Your new SMB 2.0 alias should  now be configured. Browse to \\your-new-alias to confirm.

Updated 2014/03/30 – These instructions have been confirmed to work with Windows Server 2012 R2 with SMB 3.

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 versions

In 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

Понравилась статья? Поделить с друзьями:
0 0 голоса
Рейтинг статьи
Подписаться
Уведомить о
guest

0 комментариев
Старые
Новые Популярные
Межтекстовые Отзывы
Посмотреть все комментарии
  • Taskschd msc windows 10
  • Постоянно пропадает звук на компьютере windows 10
  • Imgburn как записать windows
  • Как установить свою тему на windows 10
  • Dell realtek drivers windows 10