Vault - Unable to Rename a Windows Local Username After Vault Hardening
Symptom
Renaming a Windows local user account via Local Users and Groups (lusrmgr.msc) reverts to the original logon username without displaying any error.
Environment
12.6;13.0;13.2;14.0;14.2;14.4;14.6 Privileged Access Manager (PAM, self-hosted) Vault Server Vault Server Hardening
Cause
Vault hardening enforces restrictions on certain Windows services, including the Workstation (LanmanWorkstation) service, which is required to rename a logon username.
Resolution
To temporarily allow renaming of the logon username, follow these steps:
1) Enable the Workstation Service:
- Open "services.msc" as Administrator
- Locate "Workstation" service, right-click and select "Properties"
- If the "Startup type" is set to "Disabled", change it to "Manual"
- Click "Start" to activate the service
- Click "OK" to apply the changes
2) Rename the Logon Username:
- Open the "Local Users and Groups" (lusrmgr.msc)
- Navigate to the relevant user and rename the account as needed
- Restart the Windows server
3) Reapply Vault Hardening to the Workstation Service:
- Open "services.msc" as Administrator
- Locate "Workstation" service, right-click and select "Properties"
- Click "Stop" to deactivate the service
- Set the "Startup type" to "Disabled"
- Click "OK" to apply the changes
Notes:
- Renaming a logon username on an existing Vault installation is not recommended. Always test this procedure in a non-production environment to avoid unintended consequences.
- To prevent accidental lockout, consider creating an additional Administrator account before making changes.
- The user profile folder name will not be automatically updated when renaming a username. Manual intervention may be required if folder alignment is necessary.
- On Windows Server 2022, the "RenameLocalUser" command can be used without starting the Workstation service, offering another alternative.
- Plan usernames before Vault installation. All necessary user accounts should be configured in advance as part of your initial user structure design. Refer to the official guidance here.