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!
Comments (23)

Comments by IntenseDebate
· 911 weeks ago
Sam · 867 weeks ago
· 907 weeks ago
you can even change the root password by booting into single user mode through LIVE CD, this is not a security flaw, its a back-door recovery system.
Tommi · 871 weeks ago
Jools · 830 weeks ago
- lock up the boot sequence within bios (HDD only)
- lock up the bios (passwd)
- lock grub (passwd)
And linux kiosk are way more locked and secure than windows alternatives.
· 884 weeks ago
Is there a windows equivalent for that?
· 884 weeks ago
bat21win 0p · 883 weeks ago
Encryption, as was mentioned above, is the only real safeguard against physical access.
Geeklordz · 882 weeks ago
bat21win · 882 weeks ago
http://it.slashdot.org/article.pl?sid=07/09/10/14...
If you have a linux live cd, you can mount the windows partitions from there as well.
davekempe · 882 weeks ago
Gern · 842 weeks ago
andy · 881 weeks ago
surfed · 876 weeks ago
Faris k · 851 weeks ago
Malfist · 835 weeks ago
Julian · 880 weeks ago
theY4Kman · 872 weeks ago
Brad · 865 weeks ago
tap F8 to enter safemode.
sjjss · 851 weeks ago
Benji · 842 weeks ago
1. Use a Windows XP SP2, (SP1 may work, SP3 wont)... boot to it, duh
2. Run setup like your going to install it, but choose repair instead (not by pressing r at the first screen, but later on), this will "repair" the installation, and continue setup like normal.
3. On the second phase of setup, when it says "Detecting hardware" Hold Shift and hit F10. A command box will come up. type userpasswords2 on the command line, press enter.
4. Change the passwords as needed, or even better, make your own administrator, not even changing their password. You can cancel setup, and reboot the computer, no changes except the passwords (and your new admin) have been made.
No system is fully usable or portable or reliable, Vista tries harder by encrypting the filesystem, but makes file recovery in corporate environments and legal eDiscovery impossible. The trick is to separate your data from your OS. There are some great home and corporate NAS/SAN systems now that can encrypt data.
theodor · 831 weeks ago
????????????????????