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:
- Login to your client area
- Select your server from the Services list
- Click the Power button and select Netboot tab , then Choose Rescue and from Rescue Available select rescue64-pro.
- 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:
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:
Finally run chroot command to allow you run your change password command
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:
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,728 total views, 1 views today