Hi I found an old laptop that I would love to find out what is still on it. I hadn't updated an ubuntu that was installed in 2009. Any Idea on how to change a forgotten username and password from the login screen?
1 Answers
Don't worry. You will need to reset your password. First restart your PC, wait for the GRUB menu to appear(similar to this)
Now, from the list, select the Advanced option for Ubuntu and click Enter There will be two options, select the option to go to recovery mode.
Now you will be present with different options of recovery mode. Now you have to choose Root Drop into root shell prompt
You need to have write access to the root
partition. By default, it has only read-only access using the command
mount -rw -o remount /
Now, list all the users that are present in the system
ls /home
Use the command
passwd username
where username
is the user from the list whose password is to be reset. passwd
is used to set a password for the user.
It will prompt for a new password. Enter the new password twice (there will be no visual feedback i.e: you won't see any characters on the screen)
Then exit the root shell prompt by typing exit
When you exit, you will be back to the recovery mode menu. Select resume for normal boot option.

- 2,945
- 5
- 17
- 26