Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Okay, I've googled and checked every dang page I can find. They all tell me to add single or init=/bin/bash to the end of the kernel line. Well I don't have a line that starts with kernel when editing the grub.

How the heck do I reset the root password!?

share|improve this question

1 Answer 1

I'm assuming that you're utterly locked out of your box, otherwise you could just do:

$ sudo passwd root
[sudo] password for yourusername: type-your-pass-here
New password: type new root pass here

OK, so you're booting and you're at the grub menu. Do a quick down & up arrow to stop the automatic countdown clock. Next, just type init=/bin/bash or arrow down to repair mode (which is actually single-user mode). That is the kernel line. (You might have to tab to get down to the edit line... can't exactly recall since I'm not going to reboot just to double check).

This will bring the system up in single user mode. There you can type:

$ passwd root
New password: .....

When you've finished, exit the shell (^D or exit), and the boot process will complete.

A side note.... You really shouldn't have to set a root password on your machine. Just log in as the main user (the one you supplied when you installed ubuntu) and type sudo -i at your command prompt, and voila you become root.

share|improve this answer
    
Only problem. I don't have either password. I don't remember mine or root. And I would go to the end of the line where it says ro (and replace with rw init=/bin/bash) then boot, and it just freezes. Any chance you can take a screenshot so I can see? –  Joseph Jul 2 '11 at 0:41
    
@Joseph - No, can't really take a screen shot while it's booting :) I suggest reading ubuntugeek.com/how-to-recover-password-under-ubuntu.html (or if that doesn't work section 2.1.2 of linuxgazette.net/107/tomar.html ). After you add the rw init=/bin/bash, are you hitting Enter then pressing b to boot? –  Mark Mann Jul 2 '11 at 1:00
    
I'm changing the ro to rw, adding the init etc, then hitting control x to boot since that's all I can do :-/ –  Joseph Jul 2 '11 at 1:08
    
@Joseph - Then I suggest you boot from your install cd/dvd and follow the directions in section 2.1.2 of that second article. –  Mark Mann Jul 2 '11 at 3:21

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.