forgot username and password and the instructions online did not help

Asked by jodi

after hitting esc and getting to the highest version of recovery mode, I get a whole page of lines and then a line where I typed in Is /home but it does not recognize it. What do I do, I can't logon on because I forgot both username and password. I haven't used this computer in a while, I've been using the Mac. Please help. I'm not that savy with computers. Thank you in advance.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
HJMills
Solved:
Last query:
Last reply:

This question was reopened

  • by jodi
Revision history for this message
HJMills (hjmills) said :
#1

Hi Jodi,

When you turn your computer on and it comes up with the message about pressing Esc to see the boot options (it sounds like you have done this bit already) then press the Esc key and it will give you a list of choices. By default your computer boots the first in the list which you now cannot log in to.

You need to boot the first recovery option (as I think you have in the past) by moving the cursor over it with the arrow keys and then pressing enter.

Part way through the boot process a message will come up saying something about dropping to a root shell for maintenance. From here you can run a command to reset your password. Type in (exactly as shown, changing <username> for the user name you log in with)
passwd <username>
Press enter and it should ask you to type in a new unix password. Type one in (nothing will appear on screen) and then press enter. It will ask you to confirm it so do the same again. If it tells you it hasn't changed the password then find out why, If it mentions anything about your password being a dictionary word then thats ok - it will still be changed and it should say so.

Once you have successfully changed your password press Ctrl+D to exit the root shell and it should finish booting as normal (if not you may need to reboot if the computer doesn't do this for you).

When you get to the login screen login using the username you changed the password for and your password that you set for it and all should be hunky dory.

Let me know if you have any problems - I think everything I wrote is correct but I was working from memory .

Revision history for this message
jodi (jodi0430) said :
#2

Thanks HJMills, that solved my question.

Revision history for this message
jodi (jodi0430) said :
#3

I got the password changed and rebooted using alt,cntrl,del keys. I could not get the username, I've tried everyname I can think of. How do I get the username? Thank you for helping me change the password.

Revision history for this message
Dmitry Mityugov (dmitry-mityugov) said :
#4

Hello Jodi,

The procedure you followed describes how to change password for user root, and this account is disabled by default in Ubuntu. To change password for another account, just put the name of that account in the passwd command, like in this example:

passwd dmitry

Revision history for this message
jodi (jodi0430) said :
#5

Hi Dmitry,
Your suggestion poses a problem, I don't know the username, so what name do I stick after passwd? I'm locked out until I figure out the username. I appreciate everyone who answers my plea for help.

Revision history for this message
Best HJMills (hjmills) said :
#6

Hi Jodi,

The username is the name you use to login to Ubuntu which you would have set just after entering your full name when you installed Ubuntu. If you do not know this then you will need to find the username out before you can change the password.

Boot the computer in recovery mode by pressing Esc at the GRUB menu and selecting the highest recovery mode option in the list.
When the computer goes into a maintenance shell you need to run the following commands. Type each one exactly as it is here pressing enter after each line.

cd /home
ls

This will give you a list of folders inside /home. Each of these folders (with the exception of lost & found if it is present) contains a different users files and settings on the system. For example if the list was:
adam
betty
carlos
dimitri
Then you know that the system has at least four users (five including root) called adam, betty, carlos and dimitri. You can then change a users password with the passwd command using the format:

passwd username

where username is an actual username on the system. For example to change the password for the user carlos in the example above you can use:

passwd carlos

This will prompt you to enter a password and then confirm it. The password you type in will not appear on screen.

I hope this helps. Please don't use this knowledge to get unauthorized access to any machine.

Revision history for this message
jodi (jodi0430) said :
#7

Thanks HJMills, that solved my question.

Revision history for this message
jodi (jodi0430) said :
#8

Just a note of thanks for helping me out on my username issue. Also, don't worry it is my computer that I am accessing. The problem was my college bound child set it up and forgot what he used since he was also setting up his own computer for college. He's in Missouri and I in Virginia, hence the dilemma. Again, thank you so much.

Jodi