0

My friend did not use his (dual-boot) Linux Mint 20 in a long while, and forgot password to his system.

How can one change password offline, connecting his SSD to my Debian OS, I suppose likely via chroot, or any method really?

1 Answer 1

2
  1. So, in my case, I have several directories in my /mnt, so I created directory /mnt/user

    mkdir /mnt/user
    
  2. Then, I mounted his ext4 partition with (note, I used this path as I am more used to it, of course, you can use e.g. /dev/sdXn, whichever you prefer:

    mount /dev/disk/by-id/ata-<long_name>-part2 /mnt/user
    
  3. It mounted ok, so I allowed myself to chroot into his system with:

    chroot /mnt/user /bin/bash
    
  4. Since the above step went ok too, I simply issued the change password commands, both for his username, and root:

    passwd username
    passwd root
    
  5. I put his disk back into his machine and verified I can log in. Done.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.