I'm very worried because I forgot my password to log into my Elementary System and now I can't log in, please help me as soon as possible. Thank you very much.
Using recovery mode:(using live usb/cd)
I assume you are the only user and the administrator of your system.
To change password, hold the shift key while booting live usb/cd. If that doesn't work, hold the shift key and hit esc key once after BIOS.
Note: Use arrow keys to navigate.
Select advanced options --> select recovery mode
Now using the arrow keys scroll down to root and then hit enter
You should now see a prompt, something like this:
It is read-only system, so you have to remount it with write permissions:
Run the command:
mount -rw -o remount /
Enter new password.
when you see
passwd: password updated successfully then run
exit and select resume option and hit Enter
Using live USB/CD : (using recovery mode)
Boot from live usb/cd and open terminal.
fdisk -lto identify elementary OS partition from the list.
The partition is just something like
Mount this somewhere (Be sure to select correct partition)
sudo mount /dev/sda10 /mnt
. In my system elementary OS partiton is
/dev/sda10, replace it with yours.
. If you have a
lvmpartiton, you need to mount it to
Now run the following command as it is:
for d in dev sys run proc; do sudo mount --bind /$d /mnt/$d; done
Now become root of system,
sudo chroot /mnt
Set the password for the account: