[TriLUG] Ubuntu 12.04 root password reset

matt at noway2.thruhere.net matt at noway2.thruhere.net
Mon Apr 30 08:43:16 EDT 2012

> I have "upgraded" from Ubuntu 11.10 to 12.04.
> This is successful in that I can be a guest on my own system but not my
> own username with administrative privileges. At login my former password
> (in use for a long time) is rejected.
> Searching results in messages advising to open my dual boot Ubuntu/WinXP
> in 'recovery' mode and then going to the root shell prompt.
> Fine so far, but when I do, it wants wants a password, which is exactly
> what I do not have.
> If I boot from Ubuntu on a USB drive I am still stuck in the same
> problem -- no root password
> Suggestions please.

Sounds like something barfed during the installation process.

Have you googled the how to reset root password?  If I recall the
procedure involves using a live CD, mounting the file system and then
chrooting to your normal system and then using the passwd command to reset
the password.  Using the LiveCD will get you in the door as root, but you
need to use chroot to use the correct configuration files.

Alternatively, you may be able to use the liveCD to create a password for
a user and then copy the hash out of the /etc/shadow and place it in the
one on your hard drive.

More information about the TriLUG mailing list