Knowledgebase:
How to reset password using rescue mode
Posted by Arvydas B., Last modified by Vytautas K. on 14 April 2018 10:44 AM
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.
  • After console opened, select “Troubleshooting” with arrow keys and press Enter.
  • Select Rescue a CentOS system and press Enter.
  • In Rescue mode press 1 and Enter.
  • Enter the following commands:

    chroot /mnt/sysimage

    passwd 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.
 

Debian 8/9

  • Press rescue mode
  • Open virtual Console
  • Select “Debian GNU/Linux Live” and press enter.

  • After boot up open terminal. Enter following commands:

    sudo su –

    mount /dev/sda1 /mnt

    chroot /mnt

    passwd 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”.

    1. 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
    • Select “Troubleshooting” and press enter.

    • Select “Start Fedora-Workstation-Live in basic graphic mode” and press enter.

    • Press “Try fedora” button.

    • In “Welcome to Fedora” window press “Close” button.

    • Open terminal. Enter following commands:

      mount /dev/sda1 /mnt

      chroot /mnt

      passwd 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”.

      1. Press turn off rescue mode and after that press “Power On” button to start your VPS.

       
       
      (0 vote(s))
      Helpful
      Not helpful