Differences between revisions 3 and 4
Revision 3 as of 2017-02-25 22:39:54
Size: 1293
Editor: PieterSmit
Comment:
Revision 4 as of 2017-02-25 22:42:36
Size: 1293
Editor: PieterSmit
Comment:
Deletions are marked like this. Additions are marked like this.
Line 14: Line 14:
   4. Press Ctrl + X / F19 to boot.    4. Press Ctrl + X / F10 to boot.

Linux Password Recovery

  • Links cisco/PasswordRecovery

  • Questions
    • When a user forgets a password, how do you reset it ?
    • How do you make it harder for a attacker to reset your password ?
    • How does home dir encryption factor into the recovery of a user password ?
  • Reset password
    1. Hold Shift during boot to start GRUB menu.
    2. Highlight your image and press E to edit.
    3. Find the line starting with "linux" and append rw init=/bin/bash at the end of that line.
    4. Press Ctrl + X / F10 to boot.
    5. Type in # passwd username  and set the password.

  • Home drive encryption recovery
    • After resetting the user password, it can't unwrap the encryption key to mount the home drive.
      • Use the encryption key that you saved safely when you created the system, if you don't have it the homedrive is lost, just delete the user and re-create.
    • boot ubuntu, up to login screen
    • switch to terminal <ctl><alt><f1>, and login with the user, and new password

    • printf "%s\n%s" "<LongSavedDiskEncryptionKey>" "<NewUserPassword>" | sudo ecryptfs-wrap-passphrase /home/${user}/.ecryptfs/wrapped-passphrase -

    • now <alt><f7> back to gui login, and if everything should work.

...

Linux/PasswordRecovery (last edited 2017-02-25 22:46:24 by PieterSmit)