How To Change Your Forgotten User Password From the Live Session In Linux Mint.

bob466

Well-Known Member
Joined
Oct 22, 2020
Messages
1,556
Reaction score
1,193
Credits
11,377
There are many things you can't do without your password...Login...Run Commands...Install Software...Use Timeshift...Enable the Firewall etc.
If you're a beginner and you forget your password and can't solve this problem your screwed. There's an easy way to fix this with the live session...for beginners the live session is the ISO you burn to a Flash Drive.

The first thing is Boot to the live session...you need to know is where the Linux File System is...on the Desktop open a Terminal and type this command and hit Enter.
Code:
sudo fdisk -l
you will see this...
2023-06-09-05-57.png

As you can see mine is sda3 If you have more than one partition yours will be different it might be sda4 sda5 etc...now clear the Terminal.
We now need to create a directory to mount it type this command and hit Enter.
Code:
sudo mkdir /media/sda3
The next command will mount it in the /media/sda3 folder.
Code:
sudo mount /dev/sda3 /media/sda3
Now we run the command that makes everything work...chroot. Now type this command and hit Enter.
Code:
sudo chroot /media/sda3
Now we'll use the passwd command to change your user account's password. type passwd username note my username is bob
Code:
passwd bob
Type your new password and hit Enter...Re-type your new password and hit Enter...if all is well you'll see password updated successfully.
Now type Exit and hit Enter as shown...
2023-06-09-06-00.png

Close the Terminal and Re-Boot...you'll see remove media and press Enter...when you Boot just enter you new password.

If your a beginner the best way to avoid all of this is to write down your password in an exercise book so you don't forget it as I did...especially it you use a different password for a new install...of cause you can change it with the Grub Menu but I think this is easier...hope this helps.
m1212.gif
 
Last edited:

Members online


Latest posts

Top