Steps to Recover Password in Zorin OS (Without Reinstalling)
-
Boot into Live USB (Try Zorin Mode): Start your computer with a Zorin OS live USB and choose "Try Zorin" mode.
-
Open Terminal: Access the terminal (Ctrl + Alt + T).
-
Identify the Old OS Partition: Use lsblk to locate the old OS partition (e.g., /dev/sda2).
-
Mount the Old Partition: Create a mount point and mount the old system:
sudo mkdir /mnt/oldsystem
sudo mount /dev/sda2 /mnt/oldsystem
- Bind Critical Directories: Prepare for chroot by binding system directories:
sudo mount --bind /dev /mnt/oldsystem/dev
sudo mount --bind /proc /mnt/oldsystem/proc
sudo mount --bind /sys /mnt/oldsystem/sys
sudo mount --bind /run /mnt/oldsystem/run
- Enter the Old System: Use chroot to operate within the old OS environment:
sudo chroot /mnt/oldsystem
- Reset the Password: Identify the username using ls /home and reset the password:
passwd username
- Exit and Reboot: Exit chroot, unmount directories, and reboot:
exit
sudo umount /mnt/oldsystem/{dev,proc,sys,run}
sudo umount /mnt/oldsystem
sudo reboot