How to reset a user’s password in Windows Server

To reset the password on Windows Server, we will not use the Windows boot disk, but SystemRescueCD which has the ability to reset the password for the Windows OS.

How to reset user’s password

In your account, on the Virtual Servers page, click the To panel button, and in the server control panel, you must click on Management, and then on Virtual Machines. Click on the Stop button, and then on the Disks button to connect the bootable image. After the new page opens, click on the ISO button, select SystemRescue and then click OK.

Then, you must go back and turn on the server itself and click on the VNC button.
This image will appear in front of you and you just have to select the first option and load SystemRescue.

Now that SystemRescue has loaded, we can start with the password reset process.
First we need to create a folder so that we can mount our system image, and then we mount it.
P.S. /dev/vda2 on our hosting is always the partition on which Windows Server is installed.

mkdir /mnt/Windows
mount -t ntfs -o rw /dev/vda2 /mnt/Windows

Next, go to the folder with our OS, and reset the password for the Administrator user.
When asked what exactly we want to do with the user, we choose answer 1 and reset the password.
We execute the following commands:

cd /mnt/Windows/Windows/System32/config/
chntpw -u Administrator SAM

Password reset successfully! Now we press the letter q and exit the process itself, as we don’t need to do anything else and answer with yes so that our changes are going to be saved.

We then server is turned off, unmount boot image and start the server, and then we go over VNC.
You can see that the OS has booted up, as there is no more promt login, but this should not bother you, as RDP access without a password does not work and no one can enter your server.

How to set a new password

To set a new password, open PowerShell and execute the command (IMPORTANT!! The password must be strong!):

Now we can access our server trough RDP in with our new password and use the server just like before we lost the password.