Updating a Lost Root Password

Updating a Lost Root Password

If you have lost your root password for security it’s not possible to reset it from your control panel. First2Host has no access to your server if you loose your password. If you don’t have an active LTSP we won’t be able to reset the password for you and you will need to complete this yourself. To start you need to request that we perform a netboot on your server, Submit a ticket to the server reboot team explaining you need your root password updating. After a few minutes, we will boot your server using a network image and send you access details. Log in to the server with the new login details we send you. Next, you need to mount the drive with your root account on. We mark all drives carrying the root account with a (*) Some German servers don’t have this function but the os is usually deployed to /dev/sda3


fdisk –l

you should see something like this

Device Boot Start End Blocks Id System
/dev/sda1 * 1 2550 20478976 83 Linux
/dev/sda2 2550 60736 467378176 83 Linux
/dev/sda3 60736 60801 523264 82 Linux swap / Solaris

On this system, the root account is on /dev/sda1 as defined by the *

Now you need to mount that drive so we can work on it. Type;

mount /dev/sda1 /mnt

(changing sda1 for the drive with root on, on your system)

Next, let’s Chroot so we can use it

chroot /mnt

NOTE: If your server is in Germany the correct command to use is
chroot-prepare /mnt

Now you can update the password by issuing the following command


Once you have updated your password you will need to reboot your server to exit rescue mode, make sure you set the netboot to hard drive and not rescue mode. Once you have changed the boot order to hard drive make sure you reboot the server.

Updating a Lost Root Password
12 5 100%

Dedicated Servers VPS Servers

1 Comment

Comments are closed.

Select Language
SSD NVMe VPS Server With Free cPanel License ★ 70% Faster Than SATA Storage ★ 30% Faster Than SSD Storage ★ 14 LocationsInstant Deployment