Reset your root and user passwords when you forgot both


So you forgot your root and user passwords?  Or maybe you don't know what they are?   Don't fret, on an installed system you can reset them, but its a little hacky and will require some console command line work.

Don't worry, its easy.

1.  Boot your machine.  At the grub boot menu menu, hit 'e' to edit the grub menu entry.

2.  find the line that reads like this:  

linux /boot/vmlinuz-xxxxx  

at the end of which are boot codes.  on the same line, at the end add


to the boot codes.  Press F10 or CTRL+X to boot the modified line

3.  you will get to a root level command prompt.  enter this command to make the system writable.

mount -rw -o remount /

4.  you should now have a root level command prompt.  you can use the 


command to reset the root account, and 

passwd $USER

to reset the user account passwords, where $USER is your existing username on the system

5.   Poweroff and reboot.