7

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.

18

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

Imgur

Imgur

Now using the arrow keys scroll down to root and then hit enter

Imgur

You should now see a prompt, something like this:

root@ravan:~#

It is read-only system, so you have to remount it with write permissions:

Run the command:

mount -rw -o remount /

then

passwd [user_name]

Enter new password.

Imgur

when you see passwd: password updated successfully then run exit and select resume option and hit Enter

  • well said!! cheers. – dhanushkac Nov 7 '15 at 1:30
  • you can upvote my answer @dhanush_c =) – Ravan Nov 7 '15 at 1:31
  • okay upvoted your answer. – dhanushkac Nov 7 '15 at 1:33
  • Windows 7 let's you also do something like this but Windows 8 / 10 doesn't. Elementary OS should secure recovery mode like 8 / 10 – Suici Doga Mar 14 '16 at 7:47
  • I suspect this doesn't work if the assumptions that "you are the only user and the administrator of your system" don't hold true. I'm just getting started on elementary os, so they were true for me and it worked beautifully. – hlongmore Nov 17 '18 at 5:30
3

Using live USB/CD : (using recovery mode)

  1. Boot from live usb/cd and open terminal.

  2. Use gparted or fdisk -l to identify elementary OS partition from the list.

    The partition is just something like /dev/sda1

  3. Mount this somewhere (Be sure to select correct partition)

    sudo mount /dev/sda10 /mnt
    

Note :

  • . In my system elementary OS partiton is /dev/sda10, replace it with yours.

  • . If you have a lvm partiton, you need to mount it to /mnt/


  1. Now run the following command as it is:

    for d in dev sys run proc; do sudo mount --bind /$d /mnt/$d; done
    
  2. Now become root of system,

    sudo chroot /mnt
    
  3. Set the password for the account:

    passwd [user_name]
    
  4. Now reboot

    Imgur

source here

protected by Hasan Oct 12 at 16:52

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.