CPM/SRS - winRc=5: 'Access is denied.'
Symptom
When CPM/SRS tries to manage a Windows account, a winRc=5 error is returned. Depending on which log is viewed, the error may look like the below:
- .Debug.Log:
- Reset password of user [<domain>\<username>] on target [\\<address>] ended with code [5].
- .log:
- Error in changepass to user [<domain>\<username>] on [\\<address>].(winRc=5) Access is denied.
- pm.log:
- Error in changepass to user [<domain>\<username>] on [\\<address>].(winRc=5) Access is denied.
Environment
Privileged Access Manager (PAM, self-hosted);Privilege Cloud Central Policy Manager (CPM);Secrets Rotation Service (SRS)
CPM/SRS
Windows Target
Cause
This error can be generated due to multiple different reasons including, but not limited to:
- The 'User cannot change password' flag is set on the user account in Active Directory (domain account) or in Local Users and Groups (local account).
- The user account is not assigned to the 'Access this computer from the network' Group/Local Security Policy setting.
- The user account is local to the CPM and a reconcile action was run.
- The user account is not assigned to the 'Network access: Restrict clients allowed to make calls to SAM' Group/Local Security Policy setting.
- User Account Control Remote Restrictions are preventing the user account from establishing a true remote administrative connection to the target device from the CPM/SRS connector (LOCAL accounts only).
- Remote change user password RPC methods in SAM are blocked (Windows 11 and Windows Server 2025, Version 24H2 and newer, only).
winRc stands for Windows Return Code. Windows Return Codes are generated by Windows systems. The return code shown in the CPM/SRS logs and PVWA UI is from the target Windows machine and not from CPM/SRS.
winRc=5 Error Definition:
ERROR_ACCESS_DENIED
5 (0x5)
Access is denied.
Resolution
To resolve the potential reasons for this error listed above:
Issue: The 'User cannot change password' flag is set on the user account in Active Directory (domain account) or in Local Users and Groups (local account).
Resolution:
Option #1: Remove the 'User cannot change password' flag on the account:
-
-
-
-
- Via an elevated Command Prompt window:
- Domain User - Run the following:
net user <username> /passwordchg:yes /domain - Local User - Run the following:
net user <username> /passwordchg:yes
- Domain User - Run the following:
- Via GUI:
- Domain User:
- Locate the user in Active Directory Users and Computers.
- On the Action menu, select Properties (or right-click on the user and select Properties).
- Select the Account tab.
- Deselect the 'User cannot change password' checkbox.
- Click OK.
- Local User:
- Locate the user in Local Users and Groups.
- On the Action menu, select Properties (or right-click on the user and select Properties).
- Deselect the 'User cannot change password' checkbox.
- Click OK.
- Domain User:
- Via an elevated Command Prompt window:
-
-
-
Option #2: Associate a reconcile account to the target account in PVWA and run a reconcile (reset) action instead of a change action. Ensure that the reconcile account has the correct permissions needs to reset the password of the target account.
Note: To ensure that an automated reconcile action is run instead of an automated change action, make sure that the AllowManualChange and ChangePasswordInResetMode parameters are both set to 'Yes' on the relevant platform.
Issue: The user account is not assigned to the 'Access this computer from the network' Group/Local Security Policy setting.
Resolution:
Option #1: Assign the user to the 'Access this computer from the network' policy:
-
-
-
-
- Domain User - Perform the following steps:
- Open Group Policy Management.
- Locate the relevant domain policy.
- On the Action menu, select Edit (or right-click and select Edit).
- In Group Policy Management Editor, expand Computer Configuration -> Policies -> Windows Settings -> Security Settings -> User Rights Assignment.
- Double-click the 'Access this computer from the network' policy (or right-click and select Properties).
- Click Edit Security.
- Add the user to the policy, and click OK twice
- Local User - Perform the following steps:
- Open Local Security Policy
- Expand Security Settings -> Local Policies -> User Rights Assignment.
- Double-click the 'Access this computer from the network' policy (or right-click and select Properties).
- Click Edit Security.
- Add the user to the policy, and click OK twice.
- Domain User - Perform the following steps:
-
-
-
Note: If the user is assigned to the 'Deny access to this computer from the network' policy, this supersedes the 'Access this computer from the network' policy.
Option #2: Associate a logon account to the target account in PVWA. Ensure that the logon account does not have the same restrictions regarding accessing the remote computer from the network.
Option #3: Associate a reconcile account to the target account in PVWA and run a reconcile (reset) action instead of a change action. Ensure that the reconcile account has the correct permissions needs to reset the password of the target account.
Note: To ensure that an automated reconcile action is run instead of an automated change action, make sure that the AllowManualChange and ChangePasswordInResetMode parameters are both set to 'Yes' on the relevant platform.
Issue: The user account is local to the CPM and a reconcile action was run.
Resolution: Utilize a second CPM server to reconcile the local accounts on the first CPM server. For additional details, refer to this article: How to Manage Accounts Local to a Hardened CPM
Issue: The user account is not assigned to the 'Network access: Restrict clients allowed to make calls to SAM' Group/Local Security Policy setting.
Resolution:
Option #1: Assign the user to the 'Network access: Restrict clients allowed to make calls to SAM' policy:
-
-
-
-
- Domain User - Perform the following steps:
- Open Group Policy Management.
- Locate the relevant domain policy.
- On the Action menu, select Edit (or right-click and select Edit).
- In Group Policy Management Editor, expand Computer Configuration -> Policies -> Windows Settings -> Security Settings -> Security Options.
- Double-click the 'Network access: Restrict clients allowed to make calls to SAM' policy (or right-click and select Properties).
- Click Edit Security.
- Add the user to the policy, and click OK twice.
- Local User - Perform the following steps:
- Open Local Security Policy.
- Expand Security Settings -> Local Policies -> Security Options.
- Double-click the 'Network access: Restrict clients allowed to make calls to SAM' policy (or right-click and select Properties).
- Click Edit Security.
- Add the user to the policy, and click OK twice.
- Domain User - Perform the following steps:
-
-
-
Option #2: Disable UAC Admin Approval Mode on the target device via setting the 'User Account Control: Run all administrators in Admin Approval Mode' security policy to 'Disabled'.
Note: While disabling Admin Approval Mode UAC on the target device is a valid option, it is NOT recommended by CyberArk.
Explanation: For more information on the 'Network access: Restrict clients allowed to make calls to SAM' Group/Local Security Policy setting, please refer to the following Microsoft article: Network access: Restrict clients allowed to make remote calls to SAM
Issue: User Account Control Remote Restrictions are preventing the user account from establishing a true remote administrative connection to the target device from the CPM/SRS connector (LOCAL accounts only).
Resolution:
Option #1: Disable User Account Control (UAC) Remote Restrictions on the target device. To do so:
1) Click Start, click Run, type regedit, and then press Enter.
2) Locate and then select the following registry subkey:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System
3) If the LocalAccountTokenFilterPolicy registry entry does not exist:
a) On the Edit menu, select New, and then select DWORD Value.
b) Type LocalAccountTokenFilterPolicy, and press Enter.
4) Right-click LocalAccountTokenFilterPolicy, and select Modify.
5) In the Value Data box, type 1, and select OK.
6) Close Registry Editor.
Option #2: Disable UAC Admin Approval Mode on the target device via setting the 'User Account Control: Run all administrators in Admin Approval Mode' security policy to 'Disabled'.
Note: While disabling UAC Admin Approval Mode on the target device is a valid option, it is NOT recommended by CyberArk.
Explanation: For more information on UAC Remote Restrictions, please refer to the following Microsoft article: User Account Control and Remote Restrictions
Issue: Remote change user password RPC methods in SAM are blocked (Windows 11 and Windows Server 2025, Version 24H2 and newer, only).
Resolution: Enable the 'Configure SAM change password RPC methods policy':
-
-
-
- Domain User - Perform the following steps:
- Open Group Policy Management.
- Locate the relevant domain policy.
- On the Action menu, select Edit (or right-click and select Edit).
- In Group Policy Management Editor, expand Computer Configuration -> Administrative Templates -> System -> Security Account Manager.
- Double-click the 'Configure SAM change password RPC methods policy' (or right-click and select Properties).
- Select the Enabled radio button.
- Under Options, click the drop-down menu and select Allow all change password RPC methods.
- Click OK.
- Local User - Perform the following steps:
- Open Local Group Policy Editor.
- Expand
- Computer Configuration -> Administrative Templates -> System -> Security Account Manager.
- Double-click the 'Configure SAM change password RPC methods policy' (or right-click and select Properties).
- Select the Enabled radio button.
- Under Options, click the drop-down menu and select Allow all change password RPC methods.
- Click OK.
- Domain User - Perform the following steps:
-
-
Explanation: For more information on the 'Configure SAM change password RPC methods policy' Group/Local Security Policy setting, please refer to the following Microsoft article: What's new in Windows Server 2025
Resources:
How does CPM Manage Windows Accounts Passwords
Windows System Error Codes
Windows Network Management Error Codes
Windows Routing and Remote Access Error Codes
Windows Sockets Error Codes