What to do when you forgot your password for your ubuntu machine?? Here are some simple steps on how to change the password using single user mode.
- Reboot the machine
- When grub is loading, press 'Esc'
- Choose 'Ubuntu kernel...........(recovery mode)'
- Press 'e' to edit the kernel parameter
- Append 'single init=/bin/bash' to the kernel parameter
- # mount -o remount,rw /dev/sda1
- # passwd user