Page 1 of 1

How to Reset Your Password

Posted: Wed Oct 26, 2011 11:40 am
by overthetop
This is a simple tutorial to show you how to reset your password.

This should only be done when a root password is forgoten and only if your home folder is not encrypted. This is not for changing your user password. Please change your user password from Preferences.
xenopeek wrote:WARNING! Do not do this if you have an encrypted home folder; you will not be able to access your encrypted home folder contents anymore. Change your password from Menu > Preferences > About Me, or Menu > Control Center > Users and Groups.

If you do have an encrypted home folder, please be sure to record your passphrase that you need to access your files should you forget your login password. Without this passphrase, you will not be able to recover your encrypted home folder contents in any way. Log in, open a terminal, run the following command and store the output in a safe place:

Code: Select all

ecryptfs-unwrap-passphrase
Hopefully you will never need it, but I suggest you do this immediately if you haven't done so already after installing Linux Mint with an encrypted home folder.
In order to reset your password, you have to boot into single-user mode. You can do this by selecting the recovery mode option which is usually the second choice. (If the grub menu is not visible hold the shift key down at bootup)

From the recovery menu select Drop to root shell prompt.

At the prompt enter:

Code: Select all

passwd
This will let you change your root password.

If you just want to change your user password you could enter:

Code: Select all

passwd [username]
Be sure replace [username] with your username.

Re: How to Reset Your Password

Posted: Wed Oct 26, 2011 11:45 am
by xenopeek
WARNING! Do not do this if you have an encrypted home folder; you will not be able to access your encrypted home folder contents anymore. Change your password from Menu > Preferences > About Me, or Menu > Control Center > Users and Groups.

If you do have an encrypted home folder, please be sure to record your passphrase that you need to access your files should you forget your login password. Without this passphrase, you will not be able to recover your encrypted home folder contents in any way. Log in, open a terminal, run the following command and store the output in a safe place:

Code: Select all

ecryptfs-unwrap-passphrase
Hopefully you will never need it, but I suggest you do this immediately if you haven't done so already after installing Linux Mint with an encrypted home folder.

Re: How to Reset Your Password

Posted: Wed Oct 26, 2011 11:57 am
by overthetop
xenopeek wrote:WARNING! Do not do this if you have an encrypted home folder; you will not be able to access your encrypted home folder contents anymore. Change your password from Menu > Preferences > About Me, or Menu > Control Center > Users and Groups.

If you do have an encrypted home folder, please be sure to record your passphrase that you need to access your files should you forget your login password. Without this passphrase, you will not be able to recover your encrypted home folder contents in any way. Log in, open a terminal, run the following command and store the output in a safe place:

Code: Select all

ecryptfs-unwrap-passphrase
Hopefully you will never need it, but I suggest you do this immediately if you haven't done so already after installing Linux Mint with an encrypted home folder.
Thanks for the added info Vincent :)
I forgot to specify the proper uses and warnings.

Re: How to Reset Your Password

Posted: Wed Oct 26, 2011 12:00 pm
by xenopeek
Thanks for updating it this fast 8) Your tutorial is very good for anybody without an encrypted home folder.

Re: How to Reset Your Password

Posted: Wed Oct 26, 2011 12:06 pm
by overthetop
I wrote this tutorial after answering about four different people's password questions.
Now, I just have to refere them to here! :lol:

Re: How to Reset Your Password

Posted: Thu Jul 26, 2012 9:44 am
by someonelost
Hey Thanks for the info, but when I tried this and selected Drop to root shell prompt, a prompt showed up but I couldn't type in it. It said enter root password or enter Control-D to continue but either way no characters would show up after prompt no matter what keys I pressed, it just remains blank like it can't register the keyboard anymore..any ideas or alternate route?

Re: How to Reset Your Password

Posted: Thu Jul 26, 2012 11:07 am
by xenopeek
Just type your password; on the terminal, as a security measure, you are never shown feedback from typing your password. So the cursor doesn't move and neither do any mask characters like **** appear.

Re: How to Reset Your Password

Posted: Thu Jul 26, 2012 2:44 pm
by oobetimer
xenopeek wrote:Just type your password; on the terminal, as a security measure, you are never shown feedback from typing your password. So the cursor doesn't move and neither do any mask characters like **** appear.
That does not work anymore. You have to reset via liveCD/USB .. :wink:

http://forums.linuxmint.com/viewtopic.p ... 00#p584894

Re: How to Reset Your Password

Posted: Thu Jul 26, 2012 2:57 pm
by xenopeek
oobetimer wrote:That does not work anymore. You have to reset via liveCD/USB .. :wink:
Ah, yes of course... If you never set the root password you aren't going to reset your user's password that way.

But, you can add the boot parameter init=/bin/bash from GRUB and this will allow you to boot your system and become root without needing a password. Details are given in: http://linuxers.org/howto/recover-lost-root-password