How to change user password with encrypted home dir

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
Post Reply
alLa
Level 1
Level 1
Posts: 35
Joined: Thu Feb 12, 2015 8:13 am

How to change user password with encrypted home dir

Post by alLa »

Hi guys,

I know there have been similar questions, but all seem to be a little bit different I didn't find an answer. So thanks a lot for your help again!

It is really simple, or at least I thought it should be:

(Background: I just did a clean install of LM19, but I kept the "/home" partition of my previous LM18 system untouched to keep my data. As I always did, during install I selected to encrypt my home folder. I used the old username and password in order to match up with the existing old encrypted home partition... Worked well so far. But...)

Now I'd like to change the old password:

If I do so - as a non-Linux-guru would expect - via the LM menu option 'account details', it seems to work, but next time you try to log in, you end up in an endless loop, always back to login screen, no error message or help whatsoever. If you know how to get there - what cannot be expected of a regular user IMHO - you get to the error message "Signature not found in user keyring"... With a litte trying around, I managed to reset the password (via 'passwd' in command line) to what it was before and everything works again...

So obviously changing the user password in 'account details' does not change the encryption part - and therefore is not only useless but a REAL DANGER to the regular user (if they use home folder encryption)!! This should definitely be looked into!!


And my question remains: What is a simple way to change my user password and of course the encryption password too, as they obviously have to correspond...?

Thanks for your kind help and best regards
alLa
Last edited by alLa on Wed Jul 25, 2018 9:29 am, edited 2 times in total.

User avatar
xenopeek
Level 24
Level 24
Posts: 24617
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: How to change user password with encrypted home dir

Post by xenopeek »

Are you using Cinnamon, MATE, Xfce or ...?

Home directory encryption has several problems which makes me generally recommend to use full disk encryption whenever you have that option. Full disk encryption has negligible performance impact while home directory encryption, if you work with big files (e.g., videos) or a lot of files (e.g., compiling something) or play Steam games and such, has a big and noticeable performance impact. Besides that, yes there are issues around home directory encryption and changing passwords. Programs may not have any support for home directory encryption (not be aware of it at all). The safest way to change your password if you must use home directory encryption remains to:
- be logged in to the graphical desktop -- if you're not on the graphical desktop you will wreck your account
- run the passwd command from the terminal on the graphical desktop and run the command as yourself
Image

alLa
Level 1
Level 1
Posts: 35
Joined: Thu Feb 12, 2015 8:13 am

Re: How to change user password with encrypted home dir

Post by alLa »

Hi xenopeek,

Thank you very much for your great help, that worked perfectly!

To sum it up: I am on LinuxMint 19 64bit Cinnamon, have my home directory encrypted (choose so during installation), and wanted to change my user password. This worked:
Open Terminal, simply run

Code: Select all

$ passwd
and enter your new password following the instructions.


I am a bit disappointed to hear the home directory encryption is not a good option, as it is the only option you are offered during LM installation. I am an advanced computer user but no Linux guru, so what I cannot achieve, 90% of users cannot. This should be done better: Offer better encryption options during installation, and at least make LM change encryption password too, when user changes password through LM user account details!!

Meanwhile, hopefully this thread will help someone in the future...

Thanks again and best regards
alLa

User avatar
xenopeek
Level 24
Level 24
Posts: 24617
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: [SOLVED] How to change user password with encrypted home dir

Post by xenopeek »

Disk encryption is an option during the installation of Linux Mint. You tick the box for it on the installation type screen.

As for Cinnamon, we implemented a fix in the about dialog in previous versions to make it aware of home directory encryption. I'll retest on my end with that and report to the developers if there is a regression on this.
Image

User avatar
xenopeek
Level 24
Level 24
Posts: 24617
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: [SOLVED] How to change user password with encrypted home dir

Post by xenopeek »

Adding screenshot of where to select entire disk encryption:

Image
Image

alLa
Level 1
Level 1
Posts: 35
Joined: Thu Feb 12, 2015 8:13 am

Re: How to change user password with encrypted home dir

Post by alLa »

Thanks for the screenshot. But as I always wanted to separate system and data - in order to be able to do a clean reinstall of the OS without losing my work - I chose "Something else" and then you miss out on this option I guess... Anyways thank you, will look into it the next time!


But more importantly: Changing my password still didn't work!

After turning off the computer and coming back/turning on a while later, I had the very same problem, that user password and encryption password obviously didn't match and that I was unable to login altogether - had to reset the password via command line before again...

So again: How do I change my password?

Post Reply

Return to “Newbie Questions”