1. Reboot your machine.
2. Press 'Esc' key once grub starts loading.
3. Select your kernel press 'e' on one of the kernel to edit the kernel parameter.
4. Press 'e' on the line that starts with 'kernel /vmlinuz…'.
5. Append ''single“ or “1” at the end of the line.
6. Press 'Enter'.
7. Press 'b' to boot from the appended kernel.
8. You are now in the single user mode of your linux machine once you get to the shell. You can now change the password of your account using command passwd.
9. Reboot back your machine normally.
10. Log back in to your machine using your new password.