How to reset password on a Windows VM?
You can reset the administrator password on a virtual machine (VM) with a Windows operating system (OS). The password is reset in the recovery mode.
Performing these actions may cause the OS to malfunction.
Example of resetting the password in Windows Server 2019
- Set the VM to recovery mode: Virtual machines → select the VM → menu Recovery mode → → Start mode and reboot.
- Wait until the recovery mode is started and connect to the VM via VNC: Virtual machines → select the VM → menuVNC. →
- After booting SystemRescueCD, mount the Windows partition:
Enter the command to display all partitions:The result of the command execution
Mount the required partition:Comments to the command
/dev/vda2 — partition with Windows
Go to the directory with the system configuration files:
Display the list of Windows users:The result of the command execution
RID — account ID
Admin? — is the user the administrator?
Run the chntpw utility to reset the password:Comments to the command
01f4 — administrator account ID
- If the account is locked, the utility menu will contain the item "2 — Unlock and enable user account (probably locked now)". In this case enter "2" to unlock the account.
- Enter "1" to reset the account password.
- Enter "q" to exit the utility and "y" to save the changes made.
Check the result of the utility actions:The result of the command execution
The "BLANK" status for the Administrator user means that the password has been reset.
Disable the VM's recovery mode: Virtual machines → select the VM → menu Recovery mode → → Disable mode and reboot.