Включение smb1 windows server 2019

Протокол доступа к общим файлам SMB 1.0 (Server Message Block) по умолчанию отключен в последних версиях Windows 11 и 10, а также в Windows Server 2019/2022. Эта версия протокола является небезопасной/уязвимой, и не рекомендуется использовать ее на устройствах в локальной сети. Windows поддерживает более безопасные версии протокола SMB (2.x и 3.x).

SMB v1 может быть необходим, только если в вашей сети остались устаревшие устройства с Windows XP/2003, старые версии NAS, сетевые принтеры с поддержкой SMB, устройства со старыми версиями samba, и т.д. В этой статье мы рассмотрим, как включить или отключить протокол общего доступа к файлам SMB 1.0 в Windows.

Содержание:

  • Включить/отключить SMB 1.0 в Windows 10 и 11
  • Включение и отключение SMB 1.0 в Windows Server 2019/2022
  • Аудит доступа к файловому серверу по SMB v1.0
  • <Отключение SMB 1.0 с помощью групповых политик

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

  • Клиент SMB0 – нужен для доступа к общим папками на других компьютерах
  • Сервер SMB 0 – должен быть включен, если ваш компьютер используется в качестве файлового сервера, к которому подключаются другие компьютеры и устройства.

Включить/отключить SMB 1.0 в Windows 10 и 11

Начиная с Windows 10 1709, протокол SMB 1 отключен в десктопных версиях Windows, но его можно включить из вручную.

Откройте командную строку и проверить статус компонентов протокола SMBv1 в Windows с помощью команды DISM:

Dism /online /Get-Features /format:table | find "SMB1Protocol"

dism проверить что протокола SMB1Protocol установлен в windows 10

В нашем примере видно, что все компоненты SMBv1 отключены:

SMB1Protocol                                | Disabled
SMB1Protocol-Client                         | Disabled
SMB1Protocol-Server                         | Disabled
SMB1Protocol-Deprecation                    | Disabled

В Windows 10 и 11 также можно управлять компонентами SMB 1 из панели Windows Features (
optionalfeatures.exe
). Разверните ветку Поддержка общего доступа к файлам SMB 1.0 /CIFS (SMB 1.0/CIFS File Sharing Support). Как вы видите здесь также доступны 3 компонента:

  • Клиент SMB 1.0/CIFS (SMB 1.0/CIFS Client)
  • Сервер SMB 1.0/CIFS (SMB 1.0/CIFS Server)
  • Автоматическое удаление протокола SMB0/CIFS (SMB 1.0/CIFS Automatic Removal)

Клиент SMB v1.0 нужно установить, если вашему компьютеру нужен доступ к сетевым папкам на старых устройствах. Если устаревшие сетевые устройства должны писать данные в сетевые папки на вашем компьютере, или использовать его общие сетевые принтеры, нужно включить сервер SMB 1.

настройка компонента "Поддержка общего доступа к файлам SMB 1.0 /CIFS" в WIndows 10

Вы можете включить клиент или сервер SMB 1.0 в Windows 10/11 из панели окна управления компонентами или с помощью команд:

Dism /online /Enable-Feature /FeatureName:"SMB1Protocol"
Dism /online /Enable-Feature /FeatureName:"SMB1Protocol-Client"
Dism /online /Enable-Feature /FeatureName:"SMB1Protocol-Server"

Также можно включить сервер или клиент SMBv1 с помощью PowerShell:

Enable-WindowsOptionalFeature -Online -FeatureName SMB1Protocol-Server

Enable-WindowsOptionalFeature -Online -FeatureName SMB1Protocol-Client

Если после включения клиента SMBv1, он не используется более 15 дней, он автоматически отключается.

Чтобы выключить SMB1 в Windows, выполните следующие команды DISM:

Dism /online /Disable-Feature /FeatureName:"SMB1Protocol"
Dism /online /Disable-Feature /FeatureName:"SMB1Protocol-Client"
Dism /online /Disable-Feature /FeatureName:"SMB1Protocol-Server"

Или удалите компоненты SMB1Protocol с помощью PowerShell:

Disable-WindowsOptionalFeature -Online -FeatureName SMB1Protocol -Remove

Если вы отключили поддержку SMBv1 клиента в Windows 10/11, то при доступе к сетевой папке на файловом сервере (устройстве), который поддерживает только SMBv1, появятся ошибки вида:

  • 0x80070035 — не найден сетевой путь;
  • Вы не можете подключиться к общей папке, так как она небезопасна. Эта общая папка работает по устаревшему протоколу SMB1, который небезопасен и может подвергнуть вашу систему риску атаки. Вашей системе необходимо использовать SMB2 или более позднюю версию.
     Unable to connect to file shares because it is not secure. This share requires the obsolete SMB1 protocol, which is not secure and could expose your system to attacks

    ;

    ошибки доступа по smb1 в Windows 10

  • Вы не можете подключиться к общей папке, так как она небезопасна. Эта общая папка работает по устаревшему протоколуSMB1, который небезопасен и может подвергнуть вашу систему риску атаки. Вашей системе необходимо использовать SMB2 или более позднюю версию.
    You can’t connect to the file share because it’s not secure. This share requires the obsolete SMB1 protocol, which is unsafe and could expose your system to attack. Your system requires SMB2 or higher).

Также при отключении клиента SMBv1 на компьютере перестает работать служба Computer Browser (Обозреватель компьютеров), которая используется устаревшим протоколом NetBIOS для обнаружения устройств в сети. Для корректного отображения соседних компьютеров в сетевом окружении Windows нужно настроить службу Function Discovery Provider Host (см. статью).

Включение и отключение SMB 1.0 в Windows Server 2019/2022

В Windows Server 2019 и 2022 компоненты протокола SMBv1 также по умолчанию отключены. Включить SMB v1 в этих версиях можно через Server Manager (компонент SMB 1.0/CIFS File Sharing Support) или с помощью PowerShell.

компонент SMB 1.0/CIFS File Sharing Support в Windows Server 2016

Проверить, включен ли SMB 1.0 в Windows Server с помощью команды PowerShell:

Get-WindowsFeature | Where-Object {$_.name -like "*SMB1*"} | ft Name,Installstate

Get-WindowsFeature SMB1 включить в Windows Server

Чтобы установить клиент SMB 1, выполните команду:

Install-WindowsFeature FS-SMB1-CLIENT

Включить поддержку серверной части SMB 1.0:

Install-WindowsFeature FS-SMB1-SERVER

Затем проверьте, что протокол SMB 1 включен в настройках SMB сервера. Если протокол отключен, включите его:

Get-SmbServerConfiguration | select EnableSMB1Protocol
Set-SmbServerConfiguration -EnableSMB1Protocol $true -Force

Set-SmbServerConfiguration команда EnableSMB1Protocol

Если в EnableSMB1Protocol = True, значит этот сервер поддерживает SMB 1.0 клеинтов.

Чтобы отключить SMBv1 (понадобится перезагрузка), выполните:

Set-SmbServerConfiguration -EnableSMB1Protocol $false -Force

Disable-WindowsOptionalFeature -Online -FeatureName SMB1Protocol

Чтобы полностью удалить компоненты SMB1 с диска, выполните:

Uninstall-WindowsFeature -Name FS-SMB1 -Remove

В Windows 7/8 и Windows Server 2008 R2/ 2012 можно отключать службу и драйвер доступа SMBv1 командами:

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

отключение smb1 драйвера и службы

Аудит доступа к файловому серверу по SMB v1.0

Перед отключением и полным удалением драйвера SMB 1.0 на стороне файлового сервера желательно убедится, что в сети не осталось устаревших клиентов, которые используют для подключения протокол SMB v1.0. Чтобы найти таких клиентов, нужно включить аудит доступа к файловому серверу по SMB1 протоколу:

Set-SmbServerConfiguration –AuditSmb1Access $true

Через пару дней откройте на сервере журнал событий Event Viewer -> Applications and Services -> Microsoft -> Windows -> SMBServer -> Audit и проверьте, были ли попытки доступа к ресурсам сервера по протоколу SMB1.

Проверьте, есть ли в журнале событие с EventID 3000 от источника SMBServer, в котором указано что клиент 192.168.1.10 пытается обратиться к сервере по протоколу SMB1.

SMB1 access
Client Address: 192.168.1.10
Guidance:
This event indicates that a client attempted to access the server using SMB1. To stop auditing SMB1 access, use the Windows PowerShell cmdlet Set-SmbServerConfiguration.

Аудит доступа к шарам по SMB 1.0

Вам нужно найти в сети компьютер или устройство с этим IP адресом. Если возможно обновите на нем ОС или прошивку, до версии поддерживающий, более новые протоколы SMBv2 или SMBv3. Если обновить такой клиент не удастся, придется включить SMBv1 на вашем файловом сервере.

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

Get-ADComputer -Filter {(enabled -eq $True) } | % {Invoke-Command -ComputerName $_.DNSHostName -scriptblock {If ( (Get-ItemProperty -path "HKLM:\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters").SMB1 -eq 1 ) {Write-Output "SMBv1 is enabled on ${env:computername}"}}}

Эта команда получит список активных компьютеров в домене с помощью командлета Get-ADComputer. Затем с помощью Invoke-Command выполнит подключение через PowerShell Remoting к каждому компьютеру и проверит включен ли сервис SMB 1.0.

<Отключение SMB 1.0 с помощью групповых политик

Если в вашем сети не осталось устаревших устройств, которые поддерживают только SMB 1.0, нужно полностью отключить эту версию протокола на всех компьютерах. Чтобы предотвратить ручную установку и включение компонентов SMB 1.0 на компьютерах в домене AF, можно внедрить групповую политику, которая будет принудительно отключить протокол SMB 1.0 на всех серверах и компьютерах. Т.к. в стандартных политиках Windows нет политики настройки компонентов SMB, придется отключать его через политику реестра.

  1. Откройте консоль управления Group Policy Management (
    gpmc.msc
    ), создайте новый объект GPO (disableSMBv1) и назначьте его на OU с компьютерами, на которых нужно отключить SMB1;
  2. Перейдите в режим редактирования политики. Выберите Computer Configuration -> Preferences -> Windows Settings -> Registry;
  3. Создайте новый параметр реестра (Registry Item) со следующими настройками:
    Action:
    Update

    Hive:
    HKEY_LOCAL_MACHINE

    Key Path:
    SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters

    Value name:
    SMB1

    Value type:
    REG_DWORD

    Value data:
    0

    отключить SMB1 сервер групповой политикой

  4. Данная политика отключит службу сервера SMBv1.

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

  • Параметр Start (типа REG_DWORD) со значением 4 в ветке реестра HKLM\SYSTEM\CurrentControlSet\services\mrxsmb10;
  • Параметр DependOnService (типа REG_MULTI_SZ) со значением Bowser, MRxSmb20, NSI (каждое значение с новой строки) в ветке реестра HKLM\SYSTEM\CurrentControlSet\Services\LanmanWorkstation.

групповая политика отключения службы SMBv1 клиента

Осталось обновить настройки групповых политик на клиентах и после перезагрузки проверить, что компоненты SMBv1 полностью отключены.

С помощью WMI фильтр GPO можно сделать исключения для определенных версий Windows.

В групповых политиках Security Baseline из Microsoft Security Compliance Toolkit есть отдельный административный шаблон GPO (файлы SecGuide.adml и SecGuide.ADMX), в которых есть отдельные параметры для отключения сервера и клиента SMB:

  • Configure SMB v1 server;
  • Configure SMB v1 client driver.

групповая политика для включения/отключение smbv1 сервера и клиента

If you are using Windows Server 2019 and need to enable SMB1 for compatibility reasons, follow these steps to enable it safely and securely.

What is SMB1?

SMB1 (Server Message Block version 1) is an older version of the file sharing protocol used by Windows operating systems. While SMB1 is considered outdated and less secure than newer versions like SMB2 and SMB3, some legacy systems may still rely on it for file sharing.

Enabling SMB1 on Windows Server 2019

  1. Open the ‘Server Manager’ on your Windows Server 2019.
  2. Click on ‘Manage’ from the top menu and select ‘Add Roles and Features’.
  3. Click ‘Next’ until you reach the ‘Features’ section.
  4. Scroll down and locate ‘SMB 1.0/CIFS File Sharing Support’.
  5. Check the box next to ‘SMB 1.0/CIFS Client’ and ‘SMB 1.0/CIFS Server’.
  6. Click ‘Install’ to enable SMB1 support on your server.
  7. Restart the server for the changes to take effect.

Security Risks of SMB1

It’s important to note that SMB1 is highly vulnerable to security risks such as Ransomware attacks and EternalBlue exploits. Microsoft recommends disabling SMB1 whenever possible and using newer, more secure versions of the protocol.

Hashtags

  • #WindowsServer2019
  • #SMB1
  • #FileSharing

I realize this is not a very exciting post, especially compared to my other wonderful musing on this site, but I felt I really had to write it to share the pain!

A colleague I work with needed to enable this feature on an Azure Windows Server 2019 machine to communicate with some old system that only supports Server Message Block version 1 (SMB1). Easy enough to add that right?

Trying the installation

Let’s first get some information about the feature:

Get-WindowsOptionalFeature -Online -FeatureName SMB1Protocol

The output:

Notice the State property? The feature is disabled and the payload (installation files) are not on the Azure virtual machine.

When you try to install the feature, you get:

I guess I need the Windows Server 2019 sources!

Downloading Windows Server 2019

I downloaded Windows Server 2019 (November 2019 version) from https://my.visualstudio.com/Downloads?q=SQL%20Server%202019. I am not sure if you can use the evaluation version of Windows Server 2019 because I did not try that. I downloaded the ISO to the Azure virtual machine.

Mount ISO and copy install.wim

On recent versions of Windows, you can right click an ISO and mount it. In the mounted ISO, search for install.wim and copy that file to a folder on your C: disk like c:\wim. Under c:\wim, create a folder called mount and run the following command:

dism /mount-wim /wimfile:c:\wim\install.wim /index:4 /mountdir:c:\wim\mount /readonly

The contents of install.wim is now available in c:\wim\mount. Now don’t try to enable the feature by pointing to the sources with the -source parameter of Enable-WindowsOptionalFeature. It will not work yet!

Patch the mounted files

The Azure Windows Server 2019 image (at time of writing, June 2020) has a cumulative update installed: https://support.microsoft.com/en-us/help/4551853/windows-10-update-kb4551853. For this installatin to work, I needed to download the update from https://www.catalog.update.microsoft.com/home.aspx and put it somewhere like c:\patches.

Now we can update the mounted files offline with the following command:

Dism /Add-Package /Image:"C:\wim\mount" /PackagePath="c:\patches\windows10.0-kb4551853-x64_ce1ea7def481ee2eb8bba6db49ddb42e45cba54f.msu" 

It will take a while to update! You need to do this because the files mounted from the downloaded ISO do not match the version of the Windows Server 2019 image. Without this update, the installation of the SMB1 feature will not succeed.

Enable the SMB1 feature

Now we can enable the feature with the following command:

dism /online /Enable-Feature /FeatureName:SMB1Protocol /All /source:c:\wim\mount\windows\winsxs /limitaccess 

You will need to reboot. After rebooting, from a PowerShell prompt run the command below to check the installation:

Get-WindowsOptionalFeature -Online -FeatureName SMB1Protocol

The State property should say: Enabled

Conclusion

Something this trivial took me way too long. Is there a simpler way? Let me know! 👍

And by the way, don’t enable SMB1. It’s not secure at all. But in some cases, there’s just no way around it.

We recently had a client that needed to wipe out their Nutanix storage and virtual machine cluster and to do that we needed to load a Nutanix ISO from a Windows server. No matter what source we selected we received this error message:

The source files could not be found.

windows smb10 cifs the source files could not be found

So what we Did is install a brand new Windows Server 2022 Azure Edition in Microsoft Azure period now we know that SMB 1.0 has been correctly vilified by Microsoft because of its lack of security. It’s a dangerous protocol to use in today’s world.

However SMB 1.0 / CIFS still shows as an option even in Windows Server 2022 Azure Edition so we didn’t think we should have any problems. Well it turns out we were wrong; you cannot install SMB1.0 onto Windows Server 2022 Azure Edition but you can install SMB 1.0 / CIFS onto a:

  1. Windows Server 2019 machine in Azure
  2. Windows Server 2022 box in an on-prem Hyper-V
  3. Windows 10 LTSB 2016

If you want to install SMB1.0/CIFS onto your Windows Server 2019 in azure what you have to do is install an old version of Windows Server windows Server 2019, add SMB 1.0 / CIFS:

1. Install a fresh copy of Windows Server 2019 to a temporary server  and join it to my domain. Make sure the build number is 17763.737 or lower.

2. Attach the Windows Server 2019 evaluation ISO to the server. Install the SMB1 feature and enter WIM:E:\sources\install.wim:4 as the source.

3. Reboot the server once the feature is installed

4. Install all the latest updates to the server and reboot

5. Share the C:\windows\winsxs folder on the server. Give “everyone” read permission.

6. Go to the server where you are unable to install SMB1. Do the installation but put the source as \\servername\winsxs that you shared in step 5. The installation will complete

https://techcommunity.microsoft.com/t5/windows-server-insiders/windows-server-2019-build-17623-smb1-does-no-more-exists/m-p/176832

The other thing you can do is simply install Windows Server 2022 on your on premise Hyper V and it just works.

In our case we couldn’t get an old copy of Windows Server 2019 and we had to do the install in Azure so we ended up installing Windows 10 LTSB 2016 in azure And that comes with S MB 1.0 enabled by default. at that point our Nutanix machine with was able to copy files from our Windows 10 Long Term Servicing Branch (LTSB).


Need help to Enable/Disable SMB v 1.0 in Windows? We can help you.

As part of our Server Management Services, we help our customers with software installations regularly.

Today, let’s see how our Support Engineers Enable/Disable SMB v 1.0 in Windows.

Why is Server Message Block 1.0 (SMBv1) network protocol disabled by default?

The Server Message Block 1.0 (SMBv1) network protocol is disabled by default in Windows Server 2016/2019 and Windows 10.

  • If there are no SMB 1.x clients left, we completely disable SMBv1 on all Windows devices.
  • By disabling SMB 1.0, we protect Windows computers from a wide range of vulnerabilities in this legacy protocol.
  • As a result, the devices will use new, more efficient, secure and functional versions of the SMB protocol when accessing network shares.

On the other hand, old client versions can access network shared folders only by using SMB v1.0 protocol. If there are no such clients in the network, we can completely disable SMB 1.0 on the side of file servers and client desktops.

Enable/Disable SMB v 1.0 in Windows

Before enabling or disabling the SMB 1.0 driver, we make sure that there are no legacy clients that uses it in the network.

Auditing Shared Folder Access via SMB v1.0

To do this, we enable the audit of file server access over SMB v1.0 using the following PowerShell command:

Set-SmbServerConfiguration –AuditSmb1Access $true

Also, after a couple of days, we open the Event Viewer on the server and check the log in Applications and Services -> Microsoft -> Windows -> SMBServer -> Audit. Check if any clients has access to the file server over SMB1.

To display the list of events from this event log we use the command:

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

Here, an event with EventID 3000 from the SMBServer source is seen in the log. The event indicates that the client 192.168.1.10 is trying to access the server using the SMB1 protocol

SMB1 access
Client Address: (IP address)
Guidance:
This event indicates that a client attempted to access the server using SMB1. To stop auditing SMB1 access, use the Windows PowerShell cmdlet Set-SmbServerConfiguration.

We have to find this computer or device on the network and update the OS or firmware to a version that supports newer SMB protocol versions.

Enable/Disable SMB v 1.0 in Windows Server 2016/2019

To enable support for the SMBv1 client protocol in newer versions of Windows Server, we install separate SMB 1.0/CIFS File Sharing Support feature.

It is possible either by using Server Manager or through PowerShell.

Check if SMBv1 is enabled using the PowerShell command:

Get-WindowsFeature | Where-Object {$_.name -eq “FS-SMB1”} | ft Name,Installstate

To install the FS-SMB1 feature, run:

Install-WindowsFeature FS-SMB1

Similarly, to uninstall the SMBv1 client feature (requires a reboot), run:

Uninstall-WindowsFeature –Name FS-SMB1 –Remove

Another PowerShell command that removes the SMB1Protocol feature is:

Disable-WindowsOptionalFeature -Online -FeatureName SMB1Protocol -Remove

For the server to handle SMBv1.0 client access, enable SMBv1 support at the SMB file server level in addition to the FS-SMB1 component.

Furthermore, to check, run:

Get-SmbServerConfiguration

“EnableSMB1Protocol: True” means we have access to shared folders on this server using the SMBv1 protocol.

To disable SMBv1 server support in Windows Server, we run the PowerShell command:

Set-SmbServerConfiguration -EnableSMB1Protocol $false -Force

We make sure using,

Get-SmbServerConfiguration cmdlet

In the same way, to enable SMBv1 support on the server, we run the command:

Set-SmbServerConfiguration -EnableSMB1Protocol $True -Force

On Windows 7/8 and Windows Server 2008 R2/2012, in order to disable the SMB 1.0 client, we need to disable the service and the SMBv1 access driver with the commands:

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

Disabling SMBv1 Client and Server via Group Policy

In an Active Directory domain environment, we can disable SMBv1 on all servers and computers using Group Policies (GPOs).

Since there is no separate SMB configuration policy in the standard Windows Group Policies, we have to disable it through the registry policy.

  1. Open the Group Policy Management console (gpmc.msc), create a new GPO (disableSMBv1) and link it to the OU containing the computers on which we want to disable SMB1
  2. Switch to the policy editing mode. Expand the GPO section Computer Configuration -> Preferences -> Windows Settings -> Registry
  3. Create a new Registry Item with the following setting:

Action: Update Hive: HKEY_LOCAL_MACHINE Key Path: SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters Value name: SMB1 Value type: REG_DWORD Value data: 0

This policy will disable support for the SMBv1 server component through the registry on all computers.

Also, to disable the SMB client on domain computers via GPO, create two additional registry parameters:

  • The Start parameter (REG_DWORD type) with value 4 in the registry key HKLM\SYSTEM\CurrentControlSet\services\mrxsmb10
  • The DependOnService parameter (REG_MULTI_SZ type) with the value Bowser, MRxSmb20, NSI (each value on a new line) in the reg key HKLM\SYSTEM\CurrentControlSet\Services\LanmanWorkstation.

It remains to update the Group Policy settings on the clients (

gpupdate /force

). After the reboot make sure that the SMBv1 components are completely disabled.

The Security Baseline GPOs from the Microsoft Security Compliance Toolkit have a separate administrative template MS Security Guide (

SecGuide.adml

and

SecGuide.admx files

) that have separate options for disabling the SMB server and client:

  • Configure SMB v1 server
  • Configure SMB v1 client driver

[Get our 24/7 support. Our server specialists will keep your servers fast and secure.]

Conclusion

In short, webmasters can easily enable or disable SMB using powershell. Today, we’ve seen by example how Bobcares Support Techs go about to Enable/Disable SMB v 1.0 in Windows.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = «owonCMyG5nEQ0aD71QM»;

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

0 комментариев
Старые
Новые Популярные
Межтекстовые Отзывы
Посмотреть все комментарии
  • Какую информацию предоставляет категория сообщения об ошибках windows
  • Mqtt брокер для windows
  • Could not mount the virtual disk установка windows
  • Alcohol 120 для windows 10 установка
  • Пропал значок блютуз в центре уведомлений windows 10