news
Serverspace has added a new Rocky Linux OS
WB
William Bell
November 11, 2020
Updated July 18, 2022

Restoring a root password via Recovery Boot

Control panel FAQ VPS

This instruction describes how to use a recovery image to restore a password for a root user.

Password recovery

First, open the server that you want to restore the root password for, from the server list.

Server list in the Serverspace control panel

Open a Recovery tab and select “Boot from the recovery image”.

Boot from system volume

Confirm a connection to the recovery image.

Confirmation a connection to the recovery image

The boot type will be changed.

Important: after booting from the recovery image, the server will be accessible via a Web console!

Boot from recovery image

To boot from the recovery image, you must restart the server from the control panel or using OS tools. Next, let's look at an example of a reboot from the control panel.

Go to the Actions —> Power tab and restart the server.

Power tab of Actions in the Serverspace control panel

Confirm the server reboot.

Reboot server

After restarting the server, open the Web console.

Web console in the Serverspace control panel

Select the first option *Boot SystemRescueCd using the default options.

Boot SystemRescueCd using the default options

If a command line has been already displayed in the console, the boot option was selected by default.

Command line
Command line | Serverspace

Next, you need to find out which disk partition has got the system:
fdisk -l

Disk partition
Disk partition

In this case, it is /dev/vda2/.

Create a temporary directory for a new system:mkdir /tmp/reset

Mount the system partition to the created folder:mount /dev/vda2 /tmp/reset

Change the root directory to a new one: chroot /tmp/reset

Root directory
Root directory

To change the root password, run the following command:passwd

Enter and confirm your new password.

PAY ATTENTION: When entering a password, the password characters are not displayed, but they are still entered!

Entering a password
Entering a password

Change the recovery image boot to the system boot in the Recovery tab in the control panel.

Recovery tab in the control panel Serverspace
Recovery tab in the control panel Serverspace

Restart the server from the control panel.

After restarting the server, connect to the server with a new password as usual.



Vote:
5 out of 5
Аverage rating : 5
Rated by: 2
1101 CT Amsterdam The Netherlands, Herikerbergweg 292
+31 20 262-58-98
700 300
ITGLOBAL.COM NL
700 300
We use cookies to make your experience on the Serverspace better. By continuing to browse our website, you agree to our
Use of Cookies and Privacy Policy.