Windows 10 guest access

Guest access in SMB2 disabled by default in Windows

This article describes information about Windows disabling guest access in SMB2 by default, and provides settings to enable insecure guest logons in Group Policy. However, this is generally not recommended.

Original product version: В Windows 10 — all editions, Windows Server 2019, Windows Server 2016
Original KB number: В 4046019

Symptoms

In Windows 10, Windows Server 2019, or Windows Server 2016, the SMB2 client no longer allows the following actions:

  • Guest account access to a remote server.
  • Fall back to the Guest account after invalid credentials are provided.

SMBv2 has the following behavior in these versions of Windows:

  • Windows 10 Enterprise and Windows 10 Education no longer allow a user to connect to a remote share by using guest credentials by default, even if the remote server requests guest credentials.
  • Windows Server 2016 Datacenter and Standard editions no longer allow a user to connect to a remote share by using guest credentials by default, even if the remote server requests guest credentials.
  • Windows 10 Home and Professional editions are unchanged from their previous default behavior.

If you try to connect to devices that request credentials of a guest instead of appropriate authenticated principals, you may receive the following error message:

You can’t access this shared folder because your organization’s security policies block unauthenticated guest access. These policies help protect your PC from unsafe or malicious devices on the network.

Also, if a remote server tries to force you to use guest access, or if an administrator enables guest access, the following entries are logged in the SMB Client event log:

Log entry 1

Guidance

This event indicates that the server tried to log on the user as an unauthenticated guest but was denied by the client. Guest logons do not support standard security features such as signing and encryption. So, guest logons are vulnerable to man-in-the-middle attacks that can expose sensitive data on the network. Windows disables insecure (nonsecure) guest logons by default. We recommend that you don’t enable insecure guest logons.

Log entry 2

Default registry value:
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters] «AllowInsecureGuestAuth»=dword:0

Configured registry value:
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters] «AllowInsecureGuestAuth»=dword:1

Guidance

This event indicates that an administrator has enabled insecure guest logons. An insecure guest logon occurs when a server logs on the user as an unauthenticated guest. It typically occurs in response to an authentication failure. Guest logons do not support standard security features, such as signing and encryption. So, allowing guest logons makes the client vulnerable to man-in-the-middle attacks that can expose sensitive data on the network. Windows disables insecure guest logons by default. We recommend that you don’t enable insecure guest logons.

Cause

This change in default behavior is by design and is recommended by Microsoft for security.

A malicious computer that impersonates a legitimate file server could allow users to connect as guests without their knowledge. We recommend that you don’t change this default setting. If a remote device is configured to use guest credentials, an administrator should disable guest access to that remote device and configure correct authentication and authorization.

Читайте также:  What is map network drive in windows

Windows and Windows Server have not enabled guest access or allowed remote users to connect as guest or anonymous users since Windows 2000. Only third-party remote devices might require guest access by default. Microsoft-provided operating systems do not.

Resolution

If you want to enable insecure guest access, you can configure the following Group Policy settings:

  1. Open the Local Group Policy Editor (gpedit.msc).
  2. In the console tree, select Computer Configuration >Administrative Templates >Network >Lanman Workstation.
  3. For the setting, right-click Enable insecure guest logons and select Edit.
  4. Select Enabled and select OK.

By enabling insecure guest logons, this setting reduces the security of Windows clients.

More information

This setting has no effect on SMB1 behavior. SMB1 continues to use guest access and guest fallback.

SMB1 is uninstalled by default in latest Windows 10 and Windows Server configurations. For more information, see SMBv1 is not installed by default in Windows 10 version 1709, Windows Server version 1709 and later versions.

How to Create a Guest Account in Windows 10

By Melanie Pinola 11 March 2016

Windows’ guest account lets other people use your computer without being able to change PC settings, install apps or access your private files. That comes in handy when you have to share your computer temporarily. In Windows 10, you can no longer easily turn on the guest account from the Control Panel. Here’s a workaround to enabling a guest account — that actually works.

Across the web, you’ll find articles that tell you how to enable the «hidden» guest account in Windows 10, using the Command Prompt or the group policy editor in Windows. While these methods do make it look like the guest account is enabled, they don’t actually work. When you try to switch to the guest account, you’ll be instead forced to log into your current account.

There is a method, however, that I’ve tried that does work, adapted from a tip offered by Super User member The Professional: Create a new user account and assign it to the guests group. This will make that account act the same way the built-in guest account should: The user will be able to use your computer without accessing settings or installing apps. Since «Guest» is a reserved account name in Windows, we’ll use «Visitor.»

1. Right-click on the Windows button and select Command Prompt (Admin). This is the quickest way to open the Command Prompt as an administrator.

2. Click Yes when asked if you want to continue.

3. Type the following command and then click Enter:
net user Visitor /add /active:yes

4. Press Enter twice when asked to set a password. This will create a blank password for the account.

5. Type the following command and then hit Enter:
net localgroup users Visitor /delete

This removes the Visitor user from the default users group.

6. Type the following command and then hit Enter:
net localgroup guests Visitor /add

This adds the Visitor user to the guests group, which is more restricted than local users.

Читайте также:  Как удалить steam mac os

That’s all there is to it. You can now close the Command Prompt window.

How to Switch to the Guest Account

1. Click the Windows button.
2. Click on your username.
3. Click Visitor.

Alternatively, you can choose the Visitor account from the Windows login screen.

Now that you’ve learned how to create a guest account in Windows 10, why not figure out how to map a network drive so you can quickly access shared folders, or read our guide on how to access the BIOS on your Windows 10 system to change important settings.

Не открываются общие сетевые SMB папки в Windows 10

Если вы из Windows 10 не можете открыть сетевые папки на других сетевых устройствах (NAS, Samba сервера Linux) или на компьютерах со старыми версиями Windows (Windows 7/ XP /2003), скорее всего проблема связана с тем, что в вашей новой версии Windows 10 отключена поддержка устаревших и небезопасных версий протокола SMB (используется в Windows для доступа к общим сетевым папкам и файлам). Так, начиная с Windows 10 1709, был отключен протокол SMBv1 и анонимный (гостевой) доступ к сетевым папкам по протоколу SMBv2.

Конкретные действия, которые нужно предпринять зависят от ошибки, которая появляется в Windows 10 при доступе к общей папке и от настроек удаленного SMB сервера, на котором хранятся общие папки.

Вы не можете получить гостевой доступ к общей папке без проверки подлинности

Начиная с версии Windows 10 1709 (Fall Creators Update) Enterprise и Education пользователи стали жаловаться, что при попытке открыть сетевую папку на соседнем компьютере стала появляться ошибка:

При это на других компьютерах со старыми версиями Windows 8.1/7 или на Windows 10 с билдом до 1709, эти же сетевые каталоги открываются нормально. Эта проблем связана с тем, что в современных версиях Windows 10 (начиная с 1709) по умолчанию запрещен сетевой доступ к сетевым папкам под гостевой учетной записью по протоколу SMBv2 (и ниже). Гостевой (анонимный) доступ подразумевают доступ к сетевой папке без аутентификации. При доступе под гостевым аккаунтом по протоколу SMBv1/v2 не применяются такие методы защиты трафика, как SMB подписывание и шифрование, что делает вашу сессию уязвимой против MiTM (man-in-the-middle) атак.

При попытке открыть сетевую папку под гостем по протоколу SMB2, в журнале клиента SMB (Microsoft-Windows-SMBClient) фиксируется ошибка:

В большинстве случае с этой проблемой можно столкнуться при использовании старых версий NAS (обычно для простоты настройки на них включают гостевой доступ) или при доступе к сетевым папкам на старых версиях Windows 7/2008 R2 или Windows XP /2003 с настроенным анонимным (гостевым) доступом (см. таблицу поддерживаемых версий SMB в разных версиях Windows).

В этом случае Microsoft рекомендует изменить настройки на удаленном компьютере или NAS устройстве, который раздает сетевые папки. Желательно переключить сетевой ресурс в режим SMBv3. А если поддерживается только протокол SMBv2, настроить доступ с аутентификацией. Это самый правильный и безопасный способ исправить проблему.

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

  • NAS устройство – отключите гостевой доступ в настройках вашего NAS устройства (зависит от модели);
  • Samba сервер на Linux — если вы раздаете SMB каталог с Linux, в конфигурационном файле smb.conf в секции [global] нужно добавить строку: map to guest = never
    А в секции с описанием сетевой папки запретить анонимный доступ: guest ok = no
  • В Windows вы можете включить общий доступ к сетевым папкам и принтерам с парольной защитой в разделе Control Panel\All Control Panel Items\Network and Sharing Center\Advanced sharing settings. Для All Networks (Все сети) в секции “Общий доступ с парольной защитой” (Password Protected Sharing) имените значение на “Включить общий доступ с парольной защитой” (Turn on password protected sharing). В этом случае анонимный (гостевой) доступ к папкам будет отключен и вам придется создать локальных пользователей, предоставить им доступ к сетевым папкам и принтерам и использовать эти аккаунты для подключения к общим папкам на этом компьютере.
Читайте также:  Wo mic для линукс

Есть другой способ – изменить настройки вашего SMB клиента и разрешить доступ с него на сетевые папки под гостевой учетной записью.

Чтобы разрешить гостевой доступ с вашего компьютера, откройте редактор групповых политик (gpedit.msc) и перейдите в раздел: Конфигурация компьютера -> Административные шаблоны -> Сеть -> Рабочая станция Lanman (Computer Configuration ->Administrative templates -> Network (Сеть) -> Lanman Workstation). Включите политику Enable insecure guest logons (Включить небезопасные гостевые входы).

В Windows 10 Home, в которой нет редактора локальной GPO, вы можете внести аналогичное изменение через редактор реестра вручную:

Или такой командой:

reg add HKLM\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters /v AllowInsecureGuestAuth /t reg_dword /d 00000001 /f

Вашей системе необходимо использовать SMB2 или более позднюю

Другая возможная проблема при доступе к сетевой папке из Windows 10 – поддержка на стороне сервера только протокола SMBv1. Т.к. клиент SMBv1 по умолчанию отключен в Windows 10 1709, при попытке открыть шару вы можете получить ошибку:

При этом соседние устройства SMB могут не отображаться в сетевом окружении и при открытии по UNC пути может появляться ошибка 0x80070035.

Т.е. из сообщения об ошибке четко видно, что сетевая папка поддерживает только SMBv1 протокол доступа. В этом случае нужно попытаться перенастроить удаленное SMB устройство для поддержки как минимум SMBv2 (правильный и безопасный путь).

Если сетевые папки раздает Samba на Linux, вы можете указать минимально поддерживаемую версию SMB в файле smb.conf так:

В Windows 7/Windows Server 2008 R2 вы можете отключить SMBv1 и разрешить SMBv2 так:
Set-ItemProperty -Path «HKLM:\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters» SMB1 -Type DWORD -Value 0 –Force

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

В Windows 8.1 отключите SMBv1, разрешите SMBv2 и SMBv3 и проверьте что для вашего сетевого подключения используется частный или доменный профиль:

Disable-WindowsOptionalFeature -Online -FeatureName «SMB1Protocol»
Set-SmbServerConfiguration –EnableSMB2Protocol $true

Если ваше сетевое устройство (NAS, Windows XP, Windows Server 2003), поддерживает только протокол SMB1, в Windows 10 вы можете включить отдельный компонент SMB1Protocol-Client. Но это не рекомендуется.

Запустите консоль PowerShell и проверьте, что SMB1Protocol-Client отключен ( State: Disabled ):

Get-WindowsOptionalFeature -Online -FeatureName SMB1Protocol-Client

Включите поддержку протокола SMBv1 (потребуется перезагрузка):

Enable-WindowsOptionalFeature -Online -FeatureName SMB1Protocol-Client

Также вы можете включить/отключить дополнительные компоненты Windows 10 (в том числе SMBv1) из меню optionalfeatures.exe -> SMB 1.0/CIFS File Sharing Support

В Windows 10 1709 и выше клиент SMBv1 автоматически удаляется, если он не использовался более 15 дней (за это отвечает компонент SMB 1.0/CIFS Automatic Removal).

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

Оцените статью