migrating from Ubuntu 12.04 to LMDE - howto ecryptfs home

Archived topics about LMDE 1 and LMDE 2
Locked
nicolasdiogo

migrating from Ubuntu 12.04 to LMDE - howto ecryptfs home

Post by nicolasdiogo »

hello

i am not exactly a newbie anymore with linux but i am not certain about the support of LMDE for ecryptfs.

i understand that Debian will have the base packages for ecryptfs - but has LMDE the same functionality of single login-decrypt of users' home partition?

would it be too fiddly to get it to work post-install.

i would really appreciate links about this, as there are plenty of half-backed forum discussions on this subject.
let's not make this another one please!

thanks to all,
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
muffin

Re: migrating from Ubuntu 12.04 to LMDE - howto ecryptfs hom

Post by muffin »

Hello,

The short answer is yes, you can get it working how you describe. ecryptfs does all the hard work of seamless login-and-decryption etc, but getting it set up in LMDE seems to need a small workaround (creating a temporary dummy user).

Encrypting your home directory means you have to be logged out. Normally I'd do it as root from the recovery mode, but LMDE doesn't behave nicely if you set the root password in order to do this.[A] So, here's the workaround:

1) Install ecryptfs-utils, and then either reboot or load the ecryptfs kernel module ("sudo modprobe ecryptfs")
2) Create a dummy user, and add it to the sudo group (from the control centre, or "sudo adduser dummy && sudo addgroup dummy sudo")
3) Log out, and log in as the dummy user. As dummy user, run "sudo ecryptfs-migrate-home -u username" (replacing username with your real user account name...)

After that it's just normal ecryptfs setup (see , for more info if you want) - ie. test it's worked, delete the old unencrypted home directory - and delete the dummy user if you want.

Hope that helps.

- m

[A] I did the usual "sudo passwd root" to set the root password, which works fine for getting into recovery mode and setting up ecryptfs, but afterwards trying to run some applications as su doesn't work - for example, launching Software Manager from the mintMenu will only accept the root password, not mine (and yet "gksudo mintinstall" works as expected with my password). This remains true even if I lock the root password again with "sudo password -dl root", as described in [D]. This looks to me like two distinct problems: (a) recovery mode needs root password, instead of having some sort of menu system like Ubuntu; (b) mintMenu apps use some method to get escalated privileges which isn't working properly. Hopefully someone much more knowledgeable than me will know what's going on / how to resolve it for LMDE in future....
[B] https://web.archive.org/web/20161216114421/http://bodhizazen.net/Tutorials/Ecryptfs/
[C] https://wiki.ubuntu.com/EncryptedPrivateDirectory
[D] https://help.ubuntu.com/community/RootSudo
nicolasdiogo

Re: migrating from Ubuntu 12.04 to LMDE - howto ecryptfs hom

Post by nicolasdiogo »

thanks for the Great response.

it has worked like a charm..

i have also used the ecrypt tools to setup my swap partition as well.

:D
Locked

Return to “LMDE Archive”