Open a terminal
Check your current username with `whoami`
Change your own password with `passwd`
Enter your current password
Enter the new password
Re-enter the new password
To reset another user’s password, run `sudo passwd username`
Enter your sudo password
Enter the new password for that user
Re-enter the new password
If you forgot the root password, reboot into recovery mode or single-user mode
Mount the filesystem as read-write if needed
Run `passwd root`
Enter the new root password
Reboot the system
If using a live USB, boot from it
Mount the Linux partition
Chroot into the installed system
Run `passwd username` or `passwd root`
Reboot after resetting the password
