It’s useful in case you forget your password and unable to access your system.
All you have to do is:
- startup your machine and select the kernel that you use at the grub menu
- press e to start editing
- Find the line that starts with linux and change ro to rw and add init=/bin/bash then press ctrl+x
- You will directly enter the console as root, just type passwd and write your new one
That’s it, Enjoy!