Open in the explorer

Enable insecure guest logons

Activer les ouvertures de session invité non sécurisées

Type
Computer
GPO path
Computer Configuration › Policies › Administrative Templates › Network › Lanman Workstation FR: Configuration ordinateur › Stratégies › Modèles d'administration › Réseau › Station de travail LANMAN
Supported on
At least Windows Server 2016, Windows 10 FR: Au moins Windows Server 2016, Windows 10
ADMX file
LanmanWorkstation.admx
Internal name
LanmanWorkstation/Pol_EnableInsecureGuestLogons

Explanation

This policy setting determines if the SMB client will allow insecure guest logons to an SMB server.

If you enable this policy setting or if you do not configure this policy setting, the SMB client will allow insecure guest logons.

If you disable this policy setting, the SMB client will reject insecure guest logons.

If you enable signing, the SMB client will reject insecure guest logons.

Insecure guest logons are used by file servers to allow unauthenticated access to shared folders. While uncommon in an enterprise environment, insecure guest logons are frequently used by consumer Network Attached Storage (NAS) appliances acting as file servers. Windows file servers require authentication and do not use insecure guest logons by default. Since insecure guest logons are unauthenticated, important security features such as SMB Signing and SMB Encryption are disabled. As a result, clients that allow insecure guest logons are vulnerable to a variety of man-in-the-middle attacks that can result in data loss, data corruption, and exposure to malware. Additionally, any data written to a file server using an insecure guest logon is potentially accessible to anyone on the network. Microsoft recommends disabling insecure guest logons and configuring file servers to require authenticated access."

French text from Windows 11 26H2

Ce paramètre de stratégie détermine si le client SMB autorise les connexions d'invités non sécurisées à un serveur SMB.

Si vous activez ce paramètre de stratégie ou si vous ne le configurez pas, le client SMB autorisera les connexions d'invités non sécurisées.

Si vous désactivez ce paramètre de stratégie, le client SMB rejettera les connexions d'invités non sécurisées.

Si vous activez la signature, le client SMB rejettera les connexions d'invités non sécurisées.

Les serveurs de fichiers utilisent des logons invités non sécurisés pour permettre un accès non authentifié aux dossiers partagés. Bien qu'elles soient peu courantes dans un environnement d'entreprise, les connexions d'invités non sécurisées sont fréquemment utilisées par les appareils de stockage en réseau (NAS) grand public qui font office de serveurs de fichiers. Les serveurs de fichiers Windows requièrent une authentification et n'utilisent pas par défaut les connexions d'invités non sécurisées. Étant donné que les connexions d'invités non sécurisées ne sont pas authentifiées, d'importantes fonctions de sécurité telles que la signature SMB et le cryptage SMB sont désactivées. Par conséquent, les clients qui autorisent les connexions d'invités non sécurisées sont vulnérables à diverses attaques de type "man-in-the-middle« qui peuvent entraîner la perte ou l'altération de données et l'exposition à des logiciels malveillants. En outre, toutes les données écrites sur un serveur de fichiers à l'aide d'une connexion d'invité non sécurisée sont potentiellement accessibles à n'importe qui sur le réseau. Microsoft recommande de désactiver les connexions d'invités non sécurisées et de configurer les serveurs de fichiers de manière à ce qu'ils exigent un accès authentifié».

Use cases

Determines whether the SMB client accepts insecure guest logons, meaning with no password, signing or encryption. On Windows 11 Pro they are no longer allowed by default, as in Enterprise and Education editions.

Keep them refused: guest access makes interception attacks easier. If an old NAS requires it, replace it or set up real accounts rather than reopening this door.

Microsoft source: SMB security hardening

Registry

HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\LanmanWorkstation
Value name
AllowInsecureGuestAuth
StateValue written
EnabledREG_DWORD = 1
DisabledREG_DWORD = 0

PowerShell

PowerShell commands that write to the registry what the policy would write. Values in angle brackets (<…>) must be replaced.

Writing directly to the registry bypasses Group Policy: if a GPO manages this value, it will be rewritten at the next gpupdate; otherwise the value stays in place (the "tattooing" effect). Prefer a GPO or, locally, LGPO.exe. Run PowerShell as administrator for HKLM. Some policies need a restart or gpupdate /force.

Enable

# Enable: LanmanWorkstation/Pol_EnableInsecureGuestLogons
$k = 'HKLM:\Software\Policies\Microsoft\Windows\LanmanWorkstation'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'AllowInsecureGuestAuth' -Value 1 -Type DWord

Disable

# Disable: LanmanWorkstation/Pol_EnableInsecureGuestLogons
$k = 'HKLM:\Software\Policies\Microsoft\Windows\LanmanWorkstation'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'AllowInsecureGuestAuth' -Value 0 -Type DWord

Revert to "Not configured"

# Revert to "Not configured": LanmanWorkstation/Pol_EnableInsecureGuestLogons
$k = 'HKLM:\Software\Policies\Microsoft\Windows\LanmanWorkstation'
Remove-ItemProperty -Path $k -Name 'AllowInsecureGuestAuth' -ErrorAction SilentlyContinue

Availability