I installed Zorin OS on my laptop a few months ago, then stopped using it and forgot the account password. I can still log in automatically to the desktop because that was enabled, but I need the password to install games and other software. Is there a way to reset it while I'm already logged in?
2 Answers
If `sudo` requires the forgotten password, restart the laptop and open Zorin’s recovery options from the boot menu. Choose a root shell, remount the system as writable if prompted, and run `passwd YOUR_USERNAME` to set a new password. Then reboot normally. The exact recovery-menu labels can vary, so be careful to change the password for the correct account and avoid deleting files.
Since you can reach the desktop, open the Terminal and find your username with `whoami`. Then try `sudo passwd YOUR_USERNAME`, replacing `YOUR_USERNAME` with the name shown by `whoami`. Enter your current account password if prompted, then type the new password twice. Automatic login does not remove the password—it only skips asking for it at startup.

I can access the desktop normally, so I’ll try opening Terminal from there. What if `sudo` asks for the password I forgot?