How to Reset/Recover a Forgotten root Password On Linux OS

Main Steps to Reset/Recover root password on LINUX

If you forgot your root password from our dedicated server ,there are two major actions to reset the root password.

the following will describe how to go through reset your root password via rescue mode on dedicated server on both Softraid and Hardraid partitions.

Reboot Your server in rescue mode

In order to reboot your server in rescue mode:

  1. Login to your client area
  2. Select your server from the Services list
  3. Click the Power button and select Netboot tab , then Choose Rescue and from Rescue Available select rescue64-pro.
  4. Click Boot Now , then you can now use SSH to connect to your server on rescue mode.

The reboot will generate temporary access codes (password) for the Rescue Mode session. They will be sent to your email.

Change root password in rescue mode

Once you login to your server in rescue mode via SSH you have to run the following commands:

In the command line, enter the command:

parted -l

If you are using Softraid, your root partition will be /dev/mdX

If you are using Hardraid, your root partition will be /dev/sdX

Then Mount this partition by typing:

mount /dev/partitionname /mnt

Finally run chroot command to allow you run your change password command

chroot /mnt

chrooting the command response puts you in the / of the server. Now you can execute commands on your system. Once this is done, enter the following command to recover and change your root account password:

passwd root

You will then be prompted to change the password (and then type it again to confirm it) of the root account. Once that’s done, you’ll have to change back the “Netboot” option in the Control Panel to “Boot on hard disk” and restart your server to function from hard disk.  

 

 

1,394 total views, 3 views today

How to Reset/Recover a Forgotten root Password On Linux OS
5 (100%) 1 vote

Leave a Reply

Your email address will not be published. Required fields are marked *

*