Reset forgotten password (can't log in)

Write tutorials for Linux Mint here
More tutorials on https://github.com/orgs/linuxmint/discu ... /tutorials and (archive) on https://community.linuxmint.com/tutorial
Forum rules
Don't add support questions to tutorials; start your own topic in the appropriate sub-forum instead. Before you post read forum rules
Post Reply
wnd

Reset forgotten password (can't log in)

Post by wnd »

If you forgot your password and can't log in to change it, there is a generic method of resetting it that I was asked to write here.

1. Boot your Mint live installation from the USB/DVD you used to install it

2. Open terminal and mount your root partition somewhere.. for example:
$ sudo mkdir /media/root
$ sudo mount /dev/sda1 /media/root

If you don't know the device of your root partition (/dev/sda1 in example) then take a look to your disks:
$ sudo parted -l /dev/sda
$ sudo parted -l /dev/sdb
...

3. "chroot" to the partition
$ sudo chroot /media/root

4. Now you can use "passwd" to give a new password for your account
$ passwd myUserName

5. Then reboot nicely
$ exit
$ sudo umount /media/root
$ sudo reboot

Someone might still have a better approach for Mint.
Post Reply

Return to “Tutorials”