Root password
Rashkae
ubuntu at tigershaunt.com
Mon Mar 12 18:13:02 UTC 2012
On 03/12/2012 12:21 PM, Bill Stanley wrote:
> Hi,
>
> Is there any to reset the root password when the original root
> password has been forgotten? One of my friends has Ubuntu an her
> computer and was trying to change her user password. She got the root
> and user passwords mixed up and somehow changed the root password
> instead. She doesn't know what she did and the important thing is
> that the root password is lost.
>
> Of course, the root password is needed to install applications, run
> sudo and to di upgrades. I know that there is no way to recover the
> password but is there a way to reset the root password without knowing
> what it is. Without it, the computer can't be upgraded. I could try
> to reinstall Ubuntu but many of her settings would be lost and that
> would be a PITA as well.
>
> Bill Stanley
>
In a default install of Ubuntu, there is no root password. If this is
the case, the Ubuntu recovery Boot will get you to a shell with root access.
When booting the system, press and hold the Shift Key to force the Grub
menu to appear, from there, choose the Recovery Mode option. (Note: for
some reason, on my test system, as well as holding the Shift key during
boot, I have to press the ESC key when the "Grub Botting" message
appears to bring up the menu.)
If root account really is password locked and you can not open it this
way, you have to modify the boot parameters. (This is the ultimate
Linux password recovery that will work on any Linux distro as long as
the Hard drive is not encrypted.)
Again, you have to get to the Grub Menu. Press the 'e' key to Edit the
default boot options. Use the arrow keys to get to the end of the
"linux" line. This usually ends with 'ro quiet splash.' (It probably
wraps into two lines of text on your screen, but it's really all 1
line.) Delete the 'quiet splash' and replace them with 'init=/bin/sh'
Press Ctrl-X to boot.
That should dump you into a very basic command shell. Now type
'/usr/bin/passwd root" to change the root password.
More information about the ubuntu-users
mailing list