Sunday, December 27, 2009

Recover Forgotten Ubuntu Password without reinstalling

If you forgot you password for your ubuntu system you can recover using the following steps

Turn your computer on.

Press ESC at the grub prompt.

Press e for edit.

Highlight the line that begins kernel ………, press e

Go to the very end of the line, add rw init=/bin/bash

press enter, then press b to boot your system.

Your system will boot up to a passwordless root shell.

Type in passwd username

Set your password.

Type in reboot

If this doesnt work you can alternatively try this:

Turn on your computer, and as soon as you the Press Esc to enter grub message, press the escape key.

Select the option that says (recovery mode).

Your PC will boot into a shell. Once you get a command prompt, type "passwd username" where the username is your username.

Enter a new password when prompted, and again when prompted again

Type reboot to reboot your system

Another way is to boot into the system via a live cd open up Applications->Accessories->Terminal
then mount your ubuntu drive if its on /dev/sda1 do this:

mount /dev/sda1/ /media/sda1

Then we chroot into the system:

chroot /media/sda1

passwd user

Now change the password, and reboot your box!

Ref http://www.ubuntu-unleashed.com/

0 comments:

Post a Comment

 

Shaun Mallette's Blog Design by Insight © 2009