Warning: session_start(): open(/var/cpanel/php/sessions/alt-php74/sess_26fdec2a5ef8869b6c519f33712c7d93, O_RDWR) failed: No such file or directory (2) in /home/xsofthost/public_html/help/wp-content/plugins/accelerated-mobile-pages/includes/redirect.php on line 358

Warning: session_start(): Failed to read session data: files (path: /var/cpanel/php/sessions/alt-php74) in /home/xsofthost/public_html/help/wp-content/plugins/accelerated-mobile-pages/includes/redirect.php on line 358
How To Reset/Recover A Forgotten Root Password On Linux OS servers

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.

Share on facebook
Share on twitter
Share on linkedin
Share on telegram
Share on whatsapp

Related Posts