How-To Recover password under Ubuntu
Posted by admin on September 25th, 2007
Email This Post
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 you want to be notified the next time we write something please subscribe to our RSS feed.Thanks for Visiting!

September 25th, 2007 at 12:41 pm
You used to be able to type in the boot command: “linux single” and it would kick you to a root prompt. Not sure if this still works or not though.
September 25th, 2007 at 7:05 pm
Very nice step list.
Unfortunately that can be done because of a “huge” security issue with the typical Linux installations. Because using this same procedure you can also change the “root” password. So basically be aware that from your console anyone with some basic knowledge of Linux can enter in your computer. So don’t assume your data is that safe. I don’t store that important data in my computer, so I have not looked around for some solution. The BIOS password is not enough. So maybe some extra password in GRUB before entering in edition mode?
September 26th, 2007 at 8:17 am
@Kubunteando: Protecting from edit kernel parameter lines or from complete menu selections in grub can be done by using “password” and “lock” directives in grub configuration file (nornally /boot/grub/menu.lst).
Check this link: http://www.gnu.org/software/grub/manual/html_node/password.html#password
my 2 cents - the polarizer
September 26th, 2007 at 7:00 pm
To The Polarizer
Thanks. I will try it.
September 27th, 2007 at 4:38 am
I guess it is time to switch back to a secure OS like windows. I can’t believe such a glaring security hole exists. I’m glad I at least wasn’t stupid enough to claim that Linux was more secure than windows.
September 27th, 2007 at 7:17 pm
It depends what is the type of security you value.
I value that when I access my bank on the Internet I feel safe. That I did not get any “keyloggers” that steal my passwords, and I did not get that malware that who knows what is spying/doing while I am browsing the Net. That feeling of security I have it with Linux.
I never access my bank account under Windows.
Linux is far more secure than Windows.
Telling that Windows is secure is a really good joke!
September 28th, 2007 at 2:27 am
Yesterday I forgot my password, and after searching about a way, all what I needed to do is just pressing Esc to enter Grub to the kernel then write this:passwd userName (replace the userName with the account name) and you wil be asked to wright a new password
September 28th, 2007 at 11:21 pm
So much for security!
September 29th, 2007 at 10:39 pm
Well it all depends because if someone has physical access, they can just crack the windows password with Knoppix or another live cd by mounting your windows partition. So at least you can prevent this with a bootloader password.
September 29th, 2007 at 10:40 pm
Well it all depends because if someone has physical access, they can just crack the windows password with Knoppix or another live cd by mounting your windows partition. So, at least you can prevent this with a bootloader password.
October 1st, 2007 at 8:48 am
To all the windows trolls, it is as (in)secure as you choose it to be…
Just configure grub in a secure way (that prevents edits by example)…
Amazing, right…?! ^_^
January 20th, 2008 at 5:01 pm
FOMG. What a huge security hole. Thanks for the warning. I had no idea this was possible.
It is possible to password-protect the interactive startup. Follow the link to find out how to put a password on GRUB, and lock certain boot options [like recovery mode]
http://www.gnu.org/software/grub/manual/html_node/Security.html
January 24th, 2008 at 2:49 pm
wow.. fr33d0m is mentally retarded! to say windows is more secure than linux is like saying hell is a better place than haven..
sorry for being so nasty, but my dad is a propaganda hitler dude when it comes to picking linux over windoze!
so.. before making a statement like that, go check the facts, a nice Python programmed firewall running in linux will make you
impossible to be found .. and also, i think you would have be booting the machine when he/she tries to hack you?? im unsure..
LINUX POWAH!! PLEASE BRING GAMING TO LINUX!!
May 26th, 2008 at 8:22 pm
To the gamer guy, you do realize that linux has awesome games (nexuiz..also is cross-platform for the windows users)
August 13th, 2008 at 8:02 pm
This is how to reset your password; not how to recover it…
August 24th, 2008 at 10:51 am
I have ubuntu 7. I tried to reset passwd and found two kernel lines….ummm, which one to use? OK, the second one got me to a prompt, but typing a new passwd allowed me one letter only, said it was changed, but no, wrong wrong wrong, no sir, didn’t work. no go. Ummm, help?
August 24th, 2008 at 10:55 am
I need to update linux and can’t without a password. I don’t have a “questions.dat” file, so finding it there isn’t an option. I need it changed, not recovered, not how to change from the old one to a new one, not how to type passwd at the prompt……get my meaning? Do you understand now? Or need I explain it a LOT more?
August 24th, 2008 at 10:57 am
I need it wiped clean, so there IS NO PASSWORD!!!!! Hello?
September 10th, 2008 at 11:43 pm
For all those M$ supporters who think Windows is more secure:
home.eunet.no/pnordahl/ntpasswd/
A sweet, 60-second procedure.
November 7th, 2008 at 12:29 pm
your process of system recovery did work for the password to be reset thanks very much