Forgotten Password – Reader Questions
Rhonda, one of our readers asks:
“…I forgot my username and password on my ubuntu/Linux computer. How do I get back on? I have 2 computers just so you understand. One I use windows and the other I use ubuntu. I don’t want to throw the computer away so any help would be greatly appreciated…”
I’m assuming this is the username to log into Ubuntu, not the a password for GRUB or the PC itself (that is a password set in the BIOS, which is requested when the PC is turned on).
First off, there’s no need to throw the computer away, even if you are unable to garner the username or password; you can reinstall the OS.
The majority (if not all) of the Linux users I personally know, use their name as the username for regular login sessions and root as the username for administrative sessions. Ubuntu however facilitates sudo (or sudo su) via your regular username, if you’d like to perform administrative functions.
To obtain your username, try booting into the “Ubuntu Recovery Mode”. Doing so will boot you into a root access terminal. To find your username you can look inside the home to see the usernames available. Each directory name corresponds to a username. For example, when you look inside the home directory and you see another directory called “joe” then joe is also a username, if you see “rhonda”, that’s also a username and so forth…
The command to list the contents of the home directory is:
ls /home
Another way of obtaining the usernames is to issue the command:
tail /etc/passwd
And receive output, like that looks like this:
jake@testbox:~$ tail /etc/passwd
messagebus:x:108:119::/var/run/dbus:/bin/false
avahi:x:109:120:Avahi mDNS daemon,,,:/var/run/avahi-daemon:/bin/false
polkituser:x:110:122:PolicyKit,,,:/var/run/PolicyKit:/bin/false
haldaemon:x:111:123:Hardware abstraction layer,,,:/var/run/hald:/bin/false
jake:x:1000:1000:Jake Test,,,:/home/jake:/bin/bash
uml-net:x:112:125::/home/uml-net:/bin/false
ftp:x:113:65534::/home/ftp:/bin/false
Debian-exim:x:114:126::/var/spool/exim4:/bin/false
sshd:x:115:65534::/var/run/sshd:/usr/sbin/nologin
vde2-net:x:116:127::/var/run/vde2:/bin/false
jake@testbox:~$
In the above output, I’ve made the username a bold, red colour.
One we’ve obtained the username, we’re ready to work on the password issue.
Side note: Recovery mode is an option on the GRUB boot menu. If you have a “hidden menu” (where it does not show the option to select) press Esc (on the keyboard) and select the recovery mode option.
Let’s say we found that the username was “rhonda”, now we need to reset the password for this account. The command follows the syntax passwd username, using the above example, the command would be:
passwd rhonda
A prompt will ask you to provide the new password.
Now simple reboot your PC with the command:
shutdown -r now
And log in using your username and the new password you created.









This site is intended for users, looking for solutions, fixes, tweaks to get things working just they way they should. User experiences are all here along with other helpful information for the new and experienced Linux (Ubuntu) user.
Hi :)
Here’s another guide on how to do this. I suspect you will find the answer is the same in both but it’s always good to have back-up confirmation ;)
http://www.psychocats.net/ubuntu/resetpassword
Good luck and regards from
Tom :)
you can do that but skip the shutdown
type exit, press return and it continues boot sequence to gui
I need to reset my username. I cant do it, I cannot get on to ubuntu.
Hey Joe
There are a few different ways of dealing with this. First step is to ask the question in a linux answers forum such as
http://www.linuxquestions.org
or in this case try
https://answers.launchpad.net/ubuntu/+addquestion
usually you might have had to hunt around for the best forum navigating your way around via
http://distrowatch.com
but since you’ve already said it’s ubuntu then the 2nd link i gave is probably the easiest. It’s well worth creating an account (free) with them to help with any other issues.
Probably people will want to know if you already have an ubuntu cd or can make one using these links
http://www.ubuntu.com/getubuntu/download
https://help.ubuntu.com/community/BurningIsoHowto
I tend to find the cheapest possible “write once” cds that can only be bought in packs of 10 or more are much better for this than more expensive kinds.
Once you have made your cd then boot up from it to the menu with “Try Ubuntu without making changes to this machine”, if you don’t get to that menu then this guide should be able to help
https://help.ubuntu.com/community/BootFromCD
This should get you to a working desktop which we call a “LiveCd session”, most versions of linux have this ability and even if you’ve booted up from a usb stick using the same route we still usually call it a “Live Cd session” *shrugs*, sometimes people might say Live Usb but that’s rare or DoaS (Distro on a Stick). The crucial point is that you get a working desktop that can be used on almost any machine and gives you temporary storage as well as access to a linux command-line and access to your hard-drives so you can fix things – even many Windows problems :)
Hopefully whether you used a Windows machine or Linux machine to make the cd or usb it should be fairly easy to follow the instructions already given now :)
Good luck and regards from
Tom :)