If changing the password for Windows Server in the VmManager panel is not successful due to errors, here's what you should do.
To regain access, we will use the SystemRescueCD utilities.
First, go to the VmManager panel, then select your server and click the "Menu" button. In the opened window, click on the "Recovery mode" button.
After clicking, an informational window confirming the action will appear.
Click "Start recovery mode and reboot." Your server will reboot and activate recovery mode.
After some time, the server will start again.
Next, we need to connect to the server via VNC, use the appropriate button:
We have successfully connected to the server using VNC.
Now we need to enter a command to check for existing partitions:
fdisk -l
Connect the partition with the operating system using the command:
mount /dev/vda2 /mnt
Now we need to navigate to the directory with system configuration files:
cd /mnt/Windows/System32/config/
Next, we need to list Windows users, use the command:
chntpw -l SAM
By default, we see 4 users.
RID: unique account identifier.
Username: account name.
Admin?: checks if the user has administrator rights.
Lock?: indicates the presence of user protection.
Use the command to change the Administrator account:
chntpw SAM
Please note that to change the data of another user, you can use the command:
chntpw -u <username> SAM
<username> - for example, Guest.
A user editing menu will appear, enter the digit "1" to clear the password.
Check the password's presence with the command:
chntpw -l SAM
Great, now the Administrator account has no password.
Go back to the VmManager panel and click the "Recovery mode" button.
Use "Disable recovery mode and reboot."
The server has started in normal mode.
Now you can easily change the password for the service. Use the "Change Password" button, as shown in the screenshot.
Enter the new password or generate one automatically, then click "Save."
As you can see, the password change was successful.
Try connecting to the server via remote access with the new password.
Wait for the connection.
We have successfully connected to our VDS on Windows Server 2019!