CPM/SRS - winRc=2202: 'The user name or group name parameter is invalid.'
Symptom
When CPM/SRS tries to manage a Windows account, a winRc=2202 error is returned. Depending on which log is viewed, the error may look like the below:
- .Debug.Log:
- Logon with user [<username>@<domain>@<domain>] to [\\<domain>\ipc$] failed. Error: 2202.
- .log:
- Error in prreconcilepass to user <domain>\<username> on domain <address>(\\<address>). Reason: The specified username is invalid. (winRc=2202).
- pm.log:
- Error in prreconcilepass to user <domain>\<username> on domain <address>(\\<address>). Reason: The specified username is invalid. (winRc=2202).
Environment
Privileged Access Manager (PAM, self-hosted);Privilege Cloud Central Policy Manager (CPM);Secrets Rotation Service (SRS)
CPM/SRS
Windows Target
Cause
This error is can be caused by a few issues:
- Attempting to manage an account with special characters in the name. For example, the username is in UPN format instead of sAMAccountName. This is due to a Windows API limitation.
- Attempting to reconcile a Unix account with a Windows domain account, but the configuration in PVWA is not correct.
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=2202 Error Definition:
ERROR_BAD_USERNAME
2202 (0x89A)
The specified username is invalid.
Resolution
Steps to resolve the issues listed above:
Resolution: Remove the special characters.
Issue: Attempting to reconcile a Unix account with a Windows domain account, but the configuration in PVWA is not correct.
Resolution: Refer to this KB: Reconcile Unix Accounts with AD Accounts
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