I just downloaded Ubuntu 13.0 and was setting it up, and making sure that I got everything just right. And then when the log in screen I realized I forgot my password. I then rebooted and clicked left shift at the boot screen, typed in the commands and typed in "passwd sara" ( as my username is sara) But it said the user "sara" doesn't exist. I was really confused, because I just created it few seconds ago, so I went back to the login screen and it said "sara" as my login name. So, how am I supposed to change my lost password if it says my user doesn't exist?
If you didn't set a root password yet (most likely not), then the way I would do it is boot back to the install CD/USB drive that you installed from, then mount the / (root) partition and change the password.
- Boot the live CD/USB drive
- Mount the / (root) partition, this can be done a number of ways but clicking on the drive Launcher is probably the easiest.
- Now you have your computer's hard drive mounted, now its time to change root to that drive (this essentially will convert the commands you type next to apply towards your install, not the live boot)
- First, open a terminal, using the search is easy enough
- Then figure out where your drive is mounted, it will most likely be under /media/ubuntu/
- cd /media/ubuntu/[your drive here]
- sudo chroot .
- You now have chrooted into your local install
- Change your password
- sudo passwd sara
- You should now have your password set and you can reboot your computer without the live CD/USB drive and be able to login with the recently set password.