title: How to Reset the Password of a Windows VM created at: Wed Jul 17 2024 20:29:41 GMT+0000 (Coordinated Universal Time) updated at: Mon Feb 10 2025 16:44:57 GMT+0000 (Coordinated Universal Time) --- # How to Reset the Password of a Windows VM To change the administrator password on a virtual machine (VM) with a Windows OS, go to **Virtual Machines** → select VM → menu → **Change Password** and enter the new password. In some cases, such as OS failures, the password may not change. In this case, you can reset the password in recovery mode. !! This article contains instructions that can cause the OS to malfunction. Use recovery mode only if the password is not reset through the platform interface. # Example of resetting the password in Windows Server 2019 1. Set the VM to recovery mode: **Virtual machines** → select the VM → menu → **Recovery mode** → **Start mode and reboot**. 2. Wait until the recovery mode is started and connect to the VM via VNC or SPICE: **Virtual machines** → select the VM → menu → **VNC (SPICE).** 3. After booting SystemRescueCD, mount the Windows partition: 1. Enter the command to display all partitions: ```bash fdisk -l ``` ``` The result of the command execution: ``` ![media\_How%20to%20Reset%20the%20Password%20of%20a%20Windows%20VM/HuZNmwMfp4fCik-imported-image](media_How%20to%20Reset%20the%20Password%20of%20a%20Windows%20VM/HuZNmwMfp4fCik-imported-image) ``` Mount the required partition: ``` ```bash mount /dev/vda2 /mnt ``` ```  /dev/vda2 — partition with Windows ``` 1. Go to the directory with the system configuration files: ```bash cd /mnt/Windows/System32/config/ ``` 1. Display the list of Windows users: ```bash chntpw -l SAM ``` The result of the command execution: ![media\_How%20to%20Reset%20the%20Password%20of%20a%20Windows%20VM/nJct6DuVmRo0gl-imported-image](media_How%20to%20Reset%20the%20Password%20of%20a%20Windows%20VM/nJct6DuVmRo0gl-imported-image) ```  RID — account ID  Admin? — is the user the administrator? ``` 1. Run the *chntpw* utility to reset the password: ```bash chntpw -u 0x01f4 SAM ``` ```  01f4 — administrator account ID ``` 1. 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. 2. Enter "1" to reset the account password. 3. Enter "q" to exit the utility and "y" to save the changes made. 4. Check the result of the utility actions: ```bash chntpw -l SAM ``` The result of the command execution: ![media\_How%20to%20Reset%20the%20Password%20of%20a%20Windows%20VM/qzDJtGqNadR3vp-imported-image](media_How%20to%20Reset%20the%20Password%20of%20a%20Windows%20VM/qzDJtGqNadR3vp-imported-image) The "BLANK" status for the Administrator user means that the password has been reset. 1. Disable the VM's recovery mode: **Virtual machines** → select the VM → menu → **Recovery mode** → **Disable mode and reboot**. 2. Connect to the VM via VNC or SPICE and set a new password using the OS tools.