How to reset password using rescue mode?

If you are not able to reset the password for your Linux Cloud Server using the control panel you will need to place the server into rescue mode and chroot the file system of the server and run passwd to update the root password.

CENT OS 7

  • Press Rescue Mode.
  • Open virtual Console.
Virtual console
  • After console opened, select “Troubleshooting” with arrow keys and press Enter.
CentOS 7 troubleshooting
  • Select Rescue a CentOS system and press Enter.
Rescue a CentOS system
  • In Rescue mode press 1 and Enter.
  • Enter the following commands: chroot /mnt/sysimage passwd root
  • Enter new ROOT user password.
Starting installer
  • Close virtual console and press Power off button in client area and select “I want to shut down the operating system in this virtual machine”.
Stop VM
  • Press turn off rescue mode and after that press “Power On” button to start your VPS.

Debian 8/9

  • Press Rescue Mode
  • Open virtual Console
Rescue mode
  • Select “Debian GNU/Linux Live” and press enter.
Debian main menu
  • After boot up open terminal. Enter following commands:sudo su –mount /dev/sda1 /mntchroot /mntpasswd root
  • Enter new root user password.
add commands at terminal
  • Close virtual console and press Power off button in client area and select “I want to shut down the operating system in this virtual machine”.
  • Press turn off rescue mode and after that press “Power On” button to start your VPS.

Fedora 26/27

  • Press rescue mode
  • Open virtual Console
Rescue mode
  • Select “Troubleshooting” and press enter.
Fedora Workstation live
  • Select “Start Fedora-Workstation-Live in basic graphic mode” and press enter.
Troubleshooting
  • Press “Try fedora” button.
Try fedora icon
  • In “Welcome to Fedora” window press “Close” button.
Welcome to Fedora
  • Open terminal. Enter following commands:mount /dev/sda1 /mntchroot /mntpasswd root
  • Enter new root user password.
  • Close virtual console and press Power off button in client area and select “I want to shut down the operating system in this virtual machine”.
  • Press turn off rescue mode and after that press “Power On” button to start your VPS.

Was this article helpful?

Need support?

If you need any further help, don't hesitate to send a support request to our support team.