How to manually change Administrator's password in SolusVM 2 for Windows VMs?

Have more questions? Submit a request

Applicable to:

  • SolusVM 2

 

Question

How to manually change the Administrator's password in SolusVM 2 for Windows VMs?

Answer

Warning: Make sure to create data backup before proceeding further

File-based

# yum install epel-release
# yum install ntfs-3g

# modprobe nbd
# qemu-nbd --connect=/dev/nbd0 VM_DISK

# fdisk /dev/nbd0 -l
# mount /dev/nbd0p2 /mnt_path/

# cp -a   /mnt_path/Windows/System32/Utilman.exe /mnt_tmp/Windows/System32/Utilman.old
# cp -a   /mnt_path/Windows/System32/cmd.exe  /mnt_tmp/Windows/System32/Utilman.exe

# umount /mnt_path/
# qemu-nbd --disconnect /dev/nbd0
# rmmod nbd

 

LVM:

(you might need to install additional packages) # yum install libguestfs-winsupport libguestfs-tools
# kpartx -a -v VM_DISK # mount /dev/mapper/cr4vg-115_0p2 /mnt_path/ # cp -a /mnt_path/Windows/System32/Utilman.exe /mnt_tmp/Windows/System32/Utilman.old # cp -a /mnt_path/Windows/System32/cmd.exe /mnt_tmp/Windows/System32/Utilman.exe # umount /mnt_path/ # kpartx -d VM_DISK
  • Start the VPS
  • 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.
  • Execute:
    # net user Administrator new_password
    Replace new_password with actual password.
  • Close the terminal and log into the system using the new password.

 

Shutdown the VM and revert changes done to Utilman.exe file.

 

The partition /dev/nbd0p2 is given as an example and you need to use a main partition which can be found using fdisk /dev/nbd0 -l

The name cr4vg-115_0p2 is also an example, which real name will be shown in kpartx output upon execution.

Usually, the greatest is the main one.

 

Replace VM_DISK and mnt_path respectively.

To find VM_DISK use:

# virsh domblklist UUID

 

 

 

Articles in this section

Was this article helpful?
0 out of 0 found this helpful
Share

Comments

0 comments

Please sign in to leave a comment.