I did get locked out of my Ubuntu system a little while back. I’m not sure how, but the computer just wouldn’t accept my Administrator password.
Anyhow, this is for those of you who find yourselves, for whatever reason, in the same position. Fear not! For there are many pages about how to do this online. But they are all slightly different which can get a bit confusing. This is the way that worked for me.
1.) Get to the boot menu. This can be done in different ways depending on your setup. Mine goes to Grub 2 menu by default. If you are using a computer that doesn’t go to boot menu by default I think you can get there by pressing and holding shift during startup.
Your boot menu should look something like this:
4.) When it has finished loading you should be left at a root prompt like this:
5.) Type passwd and then the username of the user you are changing the password for.
For example, if the username is ‘layla’ you type:
Then press enter.
Type the password you want for this user and press enter.
IMPORTANT: As you type there will be no movement on the screen. This is normal.
7.) You will be asked to retype the password.
Type it and press enter. Again, there will be no movement on the screen but don’t worry that’s how it should be.
8.) If you have typed the password correctly both times you will receive this message:
You should now be able to log-in as Admin again.