How to change root password using Rescue system

Activating the Rescue System

To start a server in the Rescue System, it needs to be activated in the control panel

Under "Main Functions; Server" select the desired server and then open the tab "Rescue". Here the desired variant can be activated.

The password that was given to you when you activated the Rescue System can now be used to login as "root" via SSH.

Restarting the Server

To load the Rescue System, the server must be restarted.

Mounting the Drive(s) in the Rescue System

Without Software Raid

You can display the detected drives.

ls /dev/[hsv]d[a-z]*[0-9]*
 
# e.g. /dev/sda /dev/sda1 /dev/sda2 /dev/sda3

You can then mount the desired drive/partition.

mount /dev/sda3 /mnt

With Software Raid

You can display the detected MD devices.

ls /dev/md*
 
# e.g. /dev/md0 /dev/md1 /dev/md2

You can then mount the desired MD device.

mount /dev/md2 /mnt

Mounting LVM Volumes

You can display the LVM Volumes.

ls /dev/mapper/*
 
# e.g. /dev/mapper/vg0-home /dev/mapper/vg0-root /dev/mapper/vg0-swap

You can then mount the desired LVM volumes.

mount /dev/mapper/vg0-root /mnt

Resetting the Root Password

To reset the root password of the server, you must first mount the drives as explained in point 3.

Then use chroot to switch into the mounted system.

chroot-prepare /mnt
 
chroot /mnt

You can now change the password directly by using passwd.

passwd

Was this answer helpful?