Reset and restore the password of a dedicated server
You can view the password for the root user in the control panel: in the top menu, click Products → Dedicated Servers → Servers → Server page → Operating System tab . The password is available for viewing 24 hours from the start of installation and reinstallation of the OS or configuration changes.
If you forget or lose your password, you can recover it through the recovery and diagnostic modes:
- for Linux and Windows servers — recover the server password in Rescue;
- for Windows servers — recover server password in WinPE.
For macOS servers, you cannot recover your password. To continue using the server, create a ticket.
Restore server password in Rescue
Ubuntu and Debian
CentOS
Windows
-
Connect to the server in Rescue mode via KVM console or SSH.
-
Change the password for root:
passwd root
-
Enter the new password twice. The password will not be displayed on the command line.
-
Wait for a response that the password has been changed:
passwd: password updated successfully
-
If the
mount
was done manually via themount
command, synchronize the data:sync
-
Get out of the environment:
exit
-
If mounted manually via the
mount
command, unmount the file system:umount /dev/sda1 /mnt
-
Revert to the previous server boot pattern or reboot the server from the OS. When you reboot the server from the OS, the boot template will automatically change to the one that was set before the server boot template was changed. the server boot pattern was set before the server boot pattern was changed.
-
Connect to the server in Rescue mode via KVM console or SSH.
-
Change the password for root:
passwd root
-
Enter the new password twice. The password will not be displayed on the command line.
-
Update the password checksums:
touch /.autorelabel
-
If the
mount
was done manually via themount
command, synchronize the data:sync
-
Exit the environment. The partition will be automatically unmounted:
exit
-
Revert to the previous server boot pattern or reboot the server from the OS. When you reboot the server from the OS, the boot template will automatically change to the one that was set before the server boot template was changed. the server boot pattern was set before the server boot pattern was changed.
-
Connect to the server in Rescue mode via KVM console or SSH.
-
Look at the partition on the disk where the operating system resides — it's the partition with the larger volume:
fdisk -l
-
Mount the OS disk partition to the
/mnt
directory:mount -t ntfs-3g /dev/sda2 /mnt
Here
sda2
is the disk partition where the operating system resides. -
Go to the Administrator user account edit mode:
chntpw -u Administrator /mnt/Windows/System32/config/SAM
-
To reset the password, select
Clear (blank) user password
. The items may differ in different versions of the program, in the example it is item 1:1
-
Close the file:
q
-
Confirm the changes:
y
-
Revert to the previous server boot pattern or reboot the server from the OS. When you reboot the server from the OS, the boot template will automatically change to the one that was set before the server boot template was changed. the server boot pattern was set before the server boot pattern was changed.
-
Connect to the server. After resetting the password, the first connection can be made without it.
-
Set a new password on the server. To do this, go to Settings → Accounts → Sign-in Options.
-
In the Password box, click Add.
-
Enter a new password.
-
Press OK.
Restore server password in WinPE
If you set a blank password, you will not be able to connect via RDP and change the password via NTPWEdit
.
- Boot the server in WinPE recovery and diagnostic mode.
- Connect to the server in WinPE mode via a KVM console or VNC.
- Run the NTPWEdit password editing utility.
- Make sure that the Path to SAM file field specifies the path to the SAM file — this is the SAM security account manager file.
- Click Open.
- Select an account. If it is locked, unlock it: tap Unlock.
- Click Change password.
- Enter a new password. If you set a blank password, you will not be able to connect via RDP and change the password through
NTPWEdit
. - Confirm the password.
- Press OK.
- Click Save changes.
- Revert to the previous server boot pattern or reboot the server from the OS. When you reboot the server from the OS, the boot template will automatically change to the one that was set before the server boot template was changed. the server boot pattern was set before the server boot pattern was changed.