I was exploring the possibility of changing the login password of ecryptfs. In this system (Ubuntu 14.04 LTS) the login password for ecryptfs and that for the Linux user are the same. My ecryptfs-utils is version 104-0ubuntu1.14.04.4.

Admittedly, I always found the terminology password/passphrase used in ecryptfs-related pieces a bit confusing. I took some courage from this post on Ask Ubuntu where 'rewrapping' is suggested. To that end, I did run the command ecryptfs-rewrap-passphrase /home/.ecryptfs/$USER/.ecryptfs/wrapped-passphrase. There I was presented with the typical sequence of Old wrapping passphrase + New wrapping passphrase + New wrapping passphrase (again).

Whatever the 'wrapping passphrase' may mean, I thought to be playing safe by typing in the login password for all three questions. The thinking was 'Is that wrong? It'll protest. Is that right? It won't change anything'.

I then got the error

Error: Unwrapping passphrase failed [-2]
Info: Check the system log for more information from libecryptfs

and the encryption has disappeared!

For example, launching ecryptfs-unwrap-passphrase gives stat: No such file or directory. Effectively, ~\.ecryptfs and ~\.Private are now dangling symlinks. The target location /home/.ecryptfs/user/.ecryptfs is gone.

I also fear problems upon rebooting because the GUI may be looking for an encrypted directory, a problem that I am raising elsewhere on AskUbuntu, though that is not because of my doing. (Addition: after rebooting and a couple of dialogue windows about system issues to report, I could gain access to the GUI again.)

What are the possibilities to restore encryption (with ecryptfs) in this situation?

  • Don't use ecryptfs. Use proper disk encryption like LUKS. – DepressedDaniel Dec 11 '16 at 19:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.