Reset a password in Ubuntu

It’s hard to believe, but even in the short time since my friend picked up a new computer, there’s already been a password problem. Apparently it was a new password, misspelled slightly for added “security,” and then promptly forgotten. After several failed login attempts as the primary user, I got a text message pleading for help.

In Ubuntu, if you can believe this, it’s quite easy to change or “reset” the password for an account, so long as you have physical access to the machine. In total this should take you about 10 seconds to finish, give or take for the actual speed of the machine.

First restart, and then watch closely as the computer starts up again. After the BIOS screen disappears (the screen that usually shows the manufacturer’s logo, or information about the hardware), hold down the Shift key (if you’re using a version earlier than Karmic, you will probably have to press Esc repeatedly).

If all goes well, you should be at a Grub boot menu. From the list you see, pick any option that ends with the “recovery mode” option, and press return.

In Karmic and perhaps in some earlier versions, you may get a gray, blue and red menu that describes several different options; the final option — “Drop to the root shell prompt” — is good enough. Some of the earlier versions of Ubuntu went straight to the prompt.

Then you should see the command-line cursor, with root as your user name. Next type

passwd enter_username_here

and press return. You’ll need to enter the new password twice for confirmation, and then you can restart the machine.


You can logout of the root account if you like, and go back to the gray-blue-red menu, but it’s just as easy and useful to reboot from that point.

And the new password should work fine. From within Gnome there are ways for a person to adjust their password by themselves, so I gave my friend “password” as the reset one, and at some point it can be changed to something else. Crisis averted. :D

About these ads

16 Responses to “Reset a password in Ubuntu”

  1. 1 William 2010/03/12 at 1:21 PM

    Moral of the story: Always secure physical access to the machine.

  2. 3 Chris 2010/03/12 at 3:00 PM

    Now I feel safe knowing that my password is can be easily bypassed…

    • 4 K.Mandla 2010/03/12 at 4:34 PM

      Bypassed yes, provided someone can physically access your machine. But as it was put to me a long time ago, if physical security is compromised, “all bets are off.” :(

    • 5 anonymous coward 2010/03/13 at 5:00 AM

      No. You just have been educated. That’s why it’s encouraged to use BIOS boot-up passwords, boot loader password, disk encryption, and so forth.

      I know, I know, it’s not very hard to circumvent that but what can you do if one has physical access…

      I for one know of at least one netbook with an SMD SSD and all the rest also very high integrated. Makes me chuckle imagining the bad guys trying to access my rather unimportant stuff on that device…

      Yeah, famous last words… ;)

  3. 10 A.Y. Siu 2010/03/13 at 3:25 AM

    I trust the people who have physical access to my machine anyway… basically my wife and cat.

    The biggest threats are online ones, not in-person ones. People used to make fun of those who write passwords on Post-it notes right on the computer, but it’s probably safer to do that with a complex password than not write down a password at all and have it be a simple one someone can remotely log in with.

  4. 11 Matt 2010/03/13 at 6:01 AM

    Makes sense. I’ve always told customers their machines are not safe if they’re not physically secure – with any OS, if the data’s not encrypted, you can just pop the drive into another machine and sudo your way to any data. Heck, MacOSX just ignores permissions on external drives by default.

  5. 12 steve 2010/03/13 at 4:27 PM

    If you have physical access yet can still gain access to a machine that is security at it’s worst. Add that to another reason I would never use Ubuntu. In an effort to make life easier for the casual user they have sacrificed security. IMO Ubu is the MS of the Linux world and we are all worse off for it.

    • 13 Ignacio 2010/03/14 at 4:41 AM

      Steve, could you explain in more detail why ubuntu is so insecure? If you’re going to tell us about the usual sudo complaints, then don’t bother. In fact, for a desktop or laptop computer using sudo is not bad at all. OTOH, if you consider using sudo in a server that’s another story, easily changeable by any sysadmin. For the rest, I believe Ubuntu services are as secure as any other distros’.

  1. 1 Reset a password in Ubuntu | Ubuntu-News - Your one stop for news about Ubuntu Trackback on 2010/03/13 at 5:44 AM
  2. 2 Destillat #12 | - Open Source, Wet-, Web-, Software Trackback on 2010/03/13 at 7:09 PM
  3. 3 Links 13/3/2010: AMD Comes to Sub-notebooks, Tiny and Big (Game) for GNU/Linux | Boycott Novell Trackback on 2010/03/14 at 8:29 AM

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Visit the Wiki!

Some recent desktops

May 6, 2011
Musca 0.9.24 on Crux Linux
150Mhz Pentium 96Mb 8Gb CF

May 14, 2011
IceWM 1.2.37 and Arch Linux
L2300 core duo 3Gb 320Gb

Some recent games

Apr. 21, 2011
Oolite on Xubuntu 11.04
L2300 core duo 3Gb 320Gb

Enter your email address to subscribe to this blog and receive notifications of new posts.

Join 405 other followers


This work is licensed under the GNU Free Documentation License. Please see the About page for details.

Blog Stats

  • 3,960,053 hits



Get every new post delivered to your Inbox.

Join 405 other followers

%d bloggers like this: