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 the 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/<partition> /mnt
Specify
<partition>
is the partition on the disk to which you mounted the file system in step 3.. -
Return the server boot template to the previous one 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
-
Return the server boot template to the previous one 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.
-
Print information about the partitions on the available disks:
lsblk
A list of disks with partitions will appear in the response. For example:
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 0 2.9G 0 disk
└─sda1 8:1 0 2.9G 0 part
sdb 8:16 0 160G 0 disk
├─sdb1 8:17 0 159.9G 0 part
├─sdb14 8:30 0 4M 0 part
└─sdb15 8:31 0 106M 0 partHere
sda1
,sdb1
,sdb14
,sdb15
are partitions on the disk. Partition names may be different in your OS. -
Select the system partition, usually the largest partition on the disk.In the example in step 2, this is the
sdb1
partition. -
Mount the OS disk partition to the
/mnt
directory:mount -t ntfs-3g /dev/<partition> /mnt
Specify
<partition>
is the partition on the disk you selected in step 4.. -
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 from one version of the program to another, in the example it is item 1:1
-
Close the file:
q
-
Confirm the changes:
y
-
Return the server boot template to the previous one 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
-
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 the account 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 the
NTPWEdit
utility. -
Confirm the password.
-
Press OK.
-
Click Save changes.
-
Return the server boot template to the previous one 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.