Reset and restore the password of a dedicated server
You can view the password for the root user in control panel under Servers and hardware → Servers → server page → tab Operating system. The password is available for review 24 hours after the start of the installation and reinstalling the OS or changing the configuration.
If you have forgotten or lost your password, you can recover it via recovery and diagnostic modes:
- for Linux and Windows servers — reset server password in Rescue;
- for Windows servers — recover server password in WinPE.
For macOS servers, you cannot recover the password. To continue using the server, file 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 manual mounting (via the command
mount
), synchronize the data:sync
-
Get out of the environment:
exit
-
If manual mounting (via the command
mount
), unmount the file system:umount /dev/sda1 /mnt
-
Bring back the old server loading template 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 changes to the server load pattern.
-
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 manual mounting (via the command
mount
), synchronize the data:sync
-
Exit the environment. The partition will be automatically unmounted:
exit
-
Bring back the old server loading template 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 changes to the server load pattern.
-
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 partition of the disk with the OS in the directory
/mnt
:mount -t ntfs-3g /dev/sda2 /mnt
Here.
sda2
— 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
-
Bring back the old server loading template 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 changes to the server load pattern.
-
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 block Password click Add.
-
Enter a new password.
-
Click 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 KVM console or VNC.
- Run the password editing utility NTPWEdit.
- Make sure that the field Path to SAM file file path
SAM
— is a 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.
- Click OK.
- Click Save changes.
- Bring back the old server loading template 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 changes to the server load pattern.