3

ERROR: Encrypted private directory is not set up properly

I forgot my password and a computer person set up a new profile on my linux machine with a new login password which I know. The problem is I get this error when I type in the terminal: ecryptfs-mount-private.

I'm not sure this is related, but how do I set up my directory properly?

Byte Commander
  • 107,489
user111
  • 661
  • 1
  • 7
  • 9
  • Is the encrypted directory empty (containing no important data, we can just remove it and make a new one) or do you need to recover the files from within it? – Byte Commander Oct 23 '15 at 08:04
  • 1
    The encrypted directory has files in it. I need to recover the files. – user111 Oct 25 '15 at 05:49

1 Answers1

0

I think you want these two eCryptFS tools (scripts really):

  1. ecryptfs-recover-private - find and mount any encrypted private directories

    Use this to mount your old encrypted home, and copy / back them up somewhere safe.

  2. ecryptfs-migrate-home - migrate a user's home to directory to an encrypted home setup

    It's man page contains this warning:

    WARNING: Make a complete backup copy of the  non-encrypted  data  to
    another  system  or  external media. This script is dangerous and in
    case of an error, could result in data lost, or lock USER out of the
    system!
    

So I'd definitely do the ecryptfs-recover-private and create backup copies first, if the data has any value.

BUT you absolutely must have your old login passphrase in order to decrypt your old encrypted home (unless you already have a backup copy of the actual eCryptfs mount passphrase). From your statement I forgot my password you might be out of luck unless you can guess/remember your old password.

Recovering your files from a backup copy would be much easier, if you have a backup copy (everyone really should have backup copies of important data, all drives fail eventually, and forgetting passphrases is easy to do).

FYI, your actual encrypted files and wrapped-passphrase file should be stored in /home/.ecryptfs, along with every user's encrypted home. The actual home folder (for example /home/[username] only has links to the actual folders, and 2 help files. Specifically:

  • Your encrypted files should be in /home/.ecryptfs/[username]/.Private
  • wrapped-passphrase and other config files should be in /home/.ecryptfs/[username]/.ecryptfs
Xen2050
  • 8,705