through the Grub menu. If you only have one Linux distribution installed, usually the grub menu will not appear. In this case, while booting the system, hold down the SHIFT key to display the grub screen.
If you are using a dual-boot system, the grub menu should appear normally.
From the grub menu, look for recovery mode, and choose to root as the drop to root sheel prompt. Now as root we can give commands at the prompt:
To reset or change the password of any user type:
passwd userExample: passwd root