Reset Windows Administrator Password KVM – Virtualizor

Warning: Make sure to create VM backup before proceeding further

1. Stop the VPS from Virtualizor.

2. Connect to Slave via SSH

3. Find the path to the VPS disk:


root@-40:~# virsh list
 Id   Name     State
------------------------
 11   v21916   running

root@-40:~# virsh domblklist  11
 Target   Source
---------------------------------------------------------------------
 vda      /dev/ubuntu-vg/vsv21916-dyqrIg5RKjwcLFYX-hkOWDXfTDIzhZ30B

root@-40:~#

4. Run a filesystem check on the main partition:

root@-40:~# kpartx -a -v /dev/ubuntu-vg/vsv21916-dyqrIg5RKjwcLFYX-hkOWDXfTDIzhZ30B

add map ubuntu--vg-vsv21916--dyqrIg5RKjwcLFYX--hkOWDXfTDIzhZ30B1 (253:5): 0 628019200 linear 253:1 1126400


root@-40:~# ntfsfix /dev/mapper/ubuntu--vg-vsv21916--dyqrIg5RKjwcLFYX--hkOWDXfTDIzhZ30B1 

Mounting volume... The disk contains an unclean file system (0, 0).
Metadata kept in Windows cache, refused to mount.
FAILED
Attempting to correct errors... 
Processing $MFT and $MFTMirr...
Reading $MFT... OK
Reading $MFTMirr... OK
Comparing $MFTMirr to $MFT... OK
Processing of $MFT and $MFTMirr completed successfully.
Setting required flags on partition... OK
Going to empty the journal ($LogFile)... OK
Checking the alternate boot sector... OK
NTFS volume version is 3.1.
NTFS partition /dev/mapper/ubuntu--vg-vsv21916--dyqrIg5RKjwcLFYX--hkOWDXfTDIzhZ30B1 was processed successfully.


root@-40:~# kpartx -d /dev/ubuntu-vg/vsv21916-dyqrIg5RKjwcLFYX-hkOWDXfTDIzhZ30B
root@-40:~# 

5. Mount the disk and replace binary Utilman.exe with cmd.exe

root@-40:~# mkdir /mnt_tmp/

root@-40:~# guestmount  -a /dev/ubuntu-vg/vsv21916-dyqrIg5RKjwcLFYX-hkOWDXfTDIzhZ30B -i --rw /mnt_tmp/

root@-40:~# cp -a   /mnt_tmp/Windows/System32/Utilman.exe /mnt_tmp/Windows/System32/Utilman.old

root@-40:~# cp -a   /mnt_tmp/Windows/System32/cmd.exe  /mnt_tmp/Windows/System32/Utilman.exe

root@-40:~# umount /mnt_tmp/
root@-40:~#  

6. Start the VPS.
7. On the login screen (where you need to type the password), press Win + U or click the Ease of Access icon. This will open the command prompt instead of the Ease of Access tools.
8. Execute the command:

net user Administrator new_password

replace new_password with your value.

9. Close the terminal and login into the system using the new password.

Once you confirm the new password is applied revert the changes done to files.

Leave a Comment