How to Reset Your Password

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
overthetop

How to Reset Your Password

Post 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.
Last edited by overthetop on Wed Oct 26, 2011 11:54 am, edited 1 time in total.
User avatar
xenopeek
Level 25
Level 25
Posts: 29507
Joined: Wed Jul 06, 2011 3:58 am

Re: How to Reset Your Password

Post 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.
Image
overthetop

Re: How to Reset Your Password

Post 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.
User avatar
xenopeek
Level 25
Level 25
Posts: 29507
Joined: Wed Jul 06, 2011 3:58 am

Re: How to Reset Your Password

Post by xenopeek »

Thanks for updating it this fast 8) Your tutorial is very good for anybody without an encrypted home folder.
Image
overthetop

Re: How to Reset Your Password

Post 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:
someonelost

Re: How to Reset Your Password

Post 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?
User avatar
xenopeek
Level 25
Level 25
Posts: 29507
Joined: Wed Jul 06, 2011 3:58 am

Re: How to Reset Your Password

Post 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.
Image
oobetimer

Re: How to Reset Your Password

Post 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
User avatar
xenopeek
Level 25
Level 25
Posts: 29507
Joined: Wed Jul 06, 2011 3:58 am

Re: How to Reset Your Password

Post 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
Image
Post Reply

Return to “Tutorials”