Open in the explorer

Configure SAM change password RPC methods policy

Configurer la stratégie de méthodes RPC de modification de mot de passe SAM

Type
Computer
GPO path
Computer Configuration › Policies › Administrative Templates › System › Security Account Manager FR: Configuration ordinateur › Stratégies › Modèles d'administration › Système › Gestionnaire de comptes de sécurité
Supported on
SUPPORTED_Windows10
ADMX file
sam.admx
Internal name
sam/SamrChangeUserPasswordApiPolicy

Explanation

This policy enables an administrator to configure the remote usage of change user password RPC methods in security account manager(SAM).

When the policy is enabled, following options are supported:

Block all change password RPC methods: block remote usage of all the security account manager(SAM) change password RPC methods.

Allow strong encryption change password RPC method: allow remote use of the change password RPC method which uses strong encryption and blocks remote use of weak encryption methods.

Allow all change password RPC methods: allows remote usage of all the change password RPC methods irrespetive of the encryption.

Default policy: 1. Domain member computers - block all change password RPC methods.
2. Domain controllers - allow strong encryption change password RPC method.

Note: If the policy is disabled or not configured, the machine will use the default policy.

French text from Windows 11 26H2

Cette stratégie permet à un administrateur de configurer l’utilisation à distance des méthodes RPC de changement de mot de passe utilisateur dans le gestionnaire de compte de sécurité (SAM).

Lorsque la stratégie est activée, les options suivantes sont prises en charge :

Bloquer toutes les méthodes RPC de modification de mot de passe : bloquer l’utilisation à distance de toutes les méthodes RPC de modification du mot de passe du gestionnaire de comptes de sécurité (SAM).

Autoriser la méthode RPC de modification du mot de passe de chiffrement fort : autoriser l’utilisation à distance de la méthode RPC de changement de mot de passe qui utilise un chiffrement fort et bloque l’utilisation à distance de méthodes de chiffrement faibles.

Autoriser toutes les méthodes RPC de changement de mot de passe : autorise l’utilisation à distance de toutes les méthodes RPC de mot de passe modifiées indépendamment du chiffrement.

Stratégie par défaut : 1. Ordinateurs membres du domaine – bloquer toutes les méthodes RPC de changement de mot de passe.
2. Contrôleurs de domaine : autorisez la méthode RPC de changement de mot de passe de chiffrement fort.

Remarque : si la stratégie est désactivée ou non configurée, l’ordinateur utilise la stratégie par défaut.

Registry

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System\SAM
Value name
not defined in the ADMX

Enable / disable values: not defined in the ADMX (see the options below).

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: sam/SamrChangeUserPasswordApiPolicy
$k = 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System\SAM'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
# Options for Sam password change RPC method policy
# Possible options:
#   Block all change password RPC methods = 1
#   Allow strong encryption change password RPC method only = 2
#   Allow all change password RPC methods = 3
Set-ItemProperty -Path $k -Name 'SamrChangeUserPasswordApiPolicy' -Value 2 -Type DWord

Disable

# Disable: sam/SamrChangeUserPasswordApiPolicy
# No value is written in the "Disabled" state (nothing defined in the ADMX)

Revert to "Not configured"

# Revert to "Not configured": sam/SamrChangeUserPasswordApiPolicy
$k = 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System\SAM'
Remove-ItemProperty -Path $k -Name 'SamrChangeUserPasswordApiPolicy' -ErrorAction SilentlyContinue

Options (1)

LabelControlRegistry valueREG typeConstraints / details
Options for Sam password change RPC method policy:Options pour la stratégie de méthode RPC de modification du mot de passe Sam :SamrChangeUserPasswordApiPolicySettingsDrop-down listenumSamrChangeUserPasswordApiPolicyREG_DWORD
Default choice (UI): #1
LabelValue
Block all change password RPC methodsREG_DWORD = 1
Allow strong encryption change password RPC method onlyREG_DWORD = 2
Allow all change password RPC methodsREG_DWORD = 3

Availability

Windows 11

✓ 26H2✓ 25H2✓ 24H2— 23H2— 22H2— 21H2

Windows 10

— 22H2— 21H2— 21H1— 20H2— 2004— 1909— 1903— 1809— 1803— 1709— 1703— 1607— 1511— 1507

Windows Server

✓ 2025— 2022— 2016