I forgot my root password, how can i reset the root password?

Forgotten root Password

 

You can log in using single-user mode and create a new root password.Help! I forgot my root password. How do I log in now?

To enter single-user mode, reboot your computer. If you use the default boot loader, GRUB, you can enter single user mode by performing the following:

  1. At the boot loader menu, use the arrow keys to highlight the installation you want to edit and type [A] to enter into append mode.

  2. You are presented with a prompt that looks similar to the following:

    grub append> ro root=LABEL=/
    
  3. Press the Spacebar once to add a blank space, then add the word single to tell GRUB to boot into single-user Linux mode. The result should look like the following:

    ro root=LABEL=/ single
    
  4. Press [Enter] and GRUB will boot single-user Linux mode. After it finishes loading, you will be presented with a shell prompt similar to the following:

    sh#
    
  5. You can now change the root password by typing

    passwd root
    

    You will be asked to re-type the password for verification. Once you are finished, the password will be changed. You can then reboot by typing reboot at the prompt; then you can log in to root as you normally would.

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Zombie Process Slayer - Script to kill defunct processes

Here is a small script that you can use to show you which processes are zombies and which user is...

How can i cancel my dedicated server?

How Do I Cancel My Dedicated Server & Account? To cancel your account you need to login to your...

How can I move a xen LVM based virtual machine from one server to another?

For those running servers with no back-end SAN, the following instructions detail the steps...

How can i show my cpu info (linux)?

How can i show my cpu info? Log in to your server via SSH then typ;e the following command...

How can i sync hardware clock

How can i sync the hardware clock in cent os?   First make sure your clock is accurate you can...