Tech, Gadgets, Photography, Social Media and Poor Spelling
It’s always a pain when you forget your password, and i’ve often done it on an Ubuntu install. All however is not lost as a stock Ubuntu install its quite easy to reset your password
The first trick is to reboot the box, and after the computers bios screen comes up, press the ESC key a few times or press the Shift key this should bring up the Ubuntu Grub boot menu
As with the above image the numbers may be slightly different as kernel’s version numbers increase however select the first option with (Recovery Mode) in the title and press enter. This will boot Ubuntu Read Only and present you with a menu which looks a bit like this.
Selecting root will drop ou to a command prompt with root access
At this point you can do the following
to change the root password type:
to change a users password type:
so for example:
You can then enter a new password, however you might get the following error
root@username-PC:~# passwd username
Enter new UNIX password:
Retype new UNIX password: passwd:
Authentication token manipulation error passwd: password unchanged
This is happening because the filesystem has mounted read-only and the update to the filesystem can’t be written.. to resolve this type
mount -rw -o remount /
And they try and change your password, and all should be right with the world.
Now just reboot the PC and login with the new password.