Reset lost root password

Grant Root Privileges to Regular Users 2 150x150 Reset lost root password Hello all, I think every Linux admin and/or user has been there sooner or later… You're tasked with the configuration of an old server laying somewhere in your data center that has been configured by another administrator, you try to log on with the standard root password but can't, you try to find a doc or readme telling what the password is but it is nowhere to be found; you installed your Linux system, maybe out of curiosity to try this OS everyone is talking about, but forgot what the root password was/is, so how do you reset a lost root password?

It is a pretty easy and quick process, all you have to do is, at the GRUB command prompt in the image below, select the Kernel you want to boot and then press the "e" key to enter edit mode so that you can alter the boot process :

Grub 300x69 Reset lost root password

Don't pay attention to the number of Kernel in a typical installation there should be 2/3, this is just one my test machines where I need multiple kernels, you'll then see some lines similar to the following :

Selezione 002 300x44 Reset lost root password

At this point select the line where the kernel to boot is specified, usually the second one, and hit "e" again to enter edit mode for the selected line and add the text highlighted in the following image :

Selezione 003 300x60 Reset lost root password

At this point to proceed with the regular boot simply hit the "b" key and Linux will start normally but you won't see any graphical interface but instead the following prompt :

Selezione 004 300x46 Reset lost root password

The above image is an image of what is called in Linux Single User Mode while in single user mode you're not asked for any authentication and can change the password of virtually any user account, root included, exactly as when you're logged as root himself but without you're being asked any password.

At this point all you have to do to reset root password all you have to do is issue the following command :

 

1
passwd root

Now input the password two times and simply reboot the machine, all the modifications you've applied above will simply be gone as they are just temporary now login with the new root password you've just configured.

I hope you'll like and find useful this post, as always please digg it and feel free to write me if you encounter any problem with the above procedure!

Cheer Lethe.

dp seal trans 16x16 Reset lost root password  Copyright secured by Digiprove © 2010

Buzz it!
  • Share/Bookmark

1 Comment

Trackbacks and Pingbacks

Leave a Reply

 

Get Adobe Flash playerPlugin by wpburn.com wordpress themes