Bobcares

OnApp : Change Windows Password From Recovery Mode

by | Jun 26, 2021

Wondering how to Change Windows Password From Recovery Mode on OnApp? We can help you.

As part of our Server Virtualization Technologies and Services, we assist our customers with several OnApp queries.

Today, let us see how we can Reset password.

 

OnApp : Change Windows Password From Recovery Mode

Today, let us go through the steps followed by our Support Techs to reset password in recovery mode and reset Administrator password for windows VM.

Run the following commands in VM:

  • Firstly, reboot the VM in recovery mode
  • Then, get access to the Windows VM disk with the following command:
kpartx -a -p X /dev/sdb
  • Next, check if the disk exists:
fdisk -l /dev/mapper/sdbX1
  • Then, mount the disk with the following command:
mount -t ntfs-3g /dev/mapper/sdbX1 /mnt/
  • Next, run the following commands:
mv /mnt/Windows/System32/Utilman.exe /mnt/Windows/System32/Utilman.exe.bak
cp /mnt/Windows/System32/cmd.exe /mnt/Windows/System32/Utilman.exe
  • Unmount the disk:
umount /mnt/
  • Run the following command:
kpartx -d -p X /dev/sdb
  • Stop and then Start the VM via the OnApp UI
  • Once the VM starts up, log into the console and press Windows Key + U to get a Command Prompt.
  • To reset the password of an existing user, type the text below. We are changing Administrator’s password to onapppass.
net user Administrator onapppass /active:yes
  • Alternatively, if you want to create a new user with the username NewUser and password abc123 into the Administrator group.
net user NewUser abc123 /add
net localgroup Administrators NewGuy /add
  • Finally, you need to restore the original utilman.exe from the VM:
C:
cd windows\system32
del utilman.exe
ren Utilman.exe.bak Utilman.exe

 
 

How to reset Administrator’s password for Windows VM?

  • Firstly, connect to the CP with ssh:
ssh root@CP_IP_ADDRESS
su onapp
  • Connect to the Windows VM:
For 3.x templates:

ssh -o StrictHostKeyChecking=no SvcCOPSSH@VM_IP_ADDRESS

For 4.x templates:

ssh -o StrictHostKeyChecking=no Administrator@VM_IP_ADDRESS
  • Make sure that “A” in Administrator is capital letter.
  • Run Command Prompt:
cmd
  • Change Administrator’s password (recommended to set password from UI (Information -> Login administrator / password))
net user administrator newpassword
  • In case this is Windows VM with ADDS (Active Directory Domain Services) installed:
net user administrator newpassword /domain
  • Close ssh connection.

Reboot is not required and now this user can log in normally with the password from the UI.

[Need further help with OnApp? We are here for you]

Conclusion

In short, today we saw how our Support Techs Reset password on windows.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = "owonCMyG5nEQ0aD71QM";

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.