mounting encrypted home folder help

Asked by COKEDUDE

http://blog.dustinkirkland.com/2009/03/mounting-your-encrypted-home-from.html
https://help.ubuntu.com/community/EncryptedPrivateDirectory#Recovering%20Your%20Data%20Manually

I have tried to follow both of these guides with no luck. Could I please get some suggestions? Here is my output. Where are the system logs that I need?

~ $ sudo mount -t ecryptfs /media/4fa4e92e-3532-48fd-a83d-6ea340a669b6/bob /home/username/Private
Passphrase:
Select cipher:
 1) aes: blocksize = 16; min keysize = 16; max keysize = 32 (not loaded)
 2) blowfish: blocksize = 16; min keysize = 16; max keysize = 56 (not loaded)
 3) des3_ede: blocksize = 8; min keysize = 24; max keysize = 24 (not loaded)
 4) twofish: blocksize = 16; min keysize = 16; max keysize = 32 (not loaded)
 5) cast6: blocksize = 16; min keysize = 16; max keysize = 32 (not loaded)
 6) cast5: blocksize = 8; min keysize = 5; max keysize = 16 (not loaded)
Selection [aes]: 1
Select key bytes:
 1) 16
 2) 32
 3) 24
Selection [16]: 1
Enable plaintext passthrough (y/n) [n]: y
Enable filename encryption (y/n) [n]: n
Attempting to mount with the following options:
  ecryptfs_unlink_sigs
  ecryptfs_passthrough
  ecryptfs_key_bytes=16
  ecryptfs_cipher=aes
  ecryptfs_sig=3bacfa4dde6b90dd
Error mounting eCryptfs: [-2] No such file or directory
Check your system logs; visit <http://launchpad.net/ecryptfs>

Question information

Language:
English Edit question
Status:
Answered
For:
eCryptfs Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Serge Hallyn (serge-hallyn) said :
#1

Quoting COKEDUDE (<email address hidden>):
> New question #137488 on eCryptfs:
> https://answers.launchpad.net/ecryptfs/+question/137488
>
> http://blog.dustinkirkland.com/2009/03/mounting-your-encrypted-home-from.html
> https://help.ubuntu.com/community/EncryptedPrivateDirectory#Recovering%20Your%20Data%20Manually
>
> I have tried to follow both of these guides with no luck. Could I please get some suggestions? Here is my output. Where are the system logs that I need?
>
>
> ~ $ sudo mount -t ecryptfs /media/4fa4e92e-3532-48fd-a83d-6ea340a669b6/bob /home/username/Private

Unless your username really is 'username', you should substitute your actual
username here, i.e.

sudo mount -t ecryptfs /media/4fa4e92e-3532-48fd-a83d-6ea340a669b6/bob /home/bob/Private

Revision history for this message
COKEDUDE (cokedude) said :
#2

Ok I'm getting closer. I mounted it but I can't see my data.

~ $ sudo mount -t ecryptfs /media/4fa4e92e-3532-48fd-a83d-6ea340a669b6/bob /home/bob
Passphrase:
Select cipher:
 1) aes: blocksize = 16; min keysize = 16; max keysize = 32 (not loaded)
 2) blowfish: blocksize = 16; min keysize = 16; max keysize = 56 (not loaded)
 3) des3_ede: blocksize = 8; min keysize = 24; max keysize = 24 (not loaded)
 4) twofish: blocksize = 16; min keysize = 16; max keysize = 32 (not loaded)
 5) cast6: blocksize = 16; min keysize = 16; max keysize = 32 (not loaded)
 6) cast5: blocksize = 8; min keysize = 5; max keysize = 16 (not loaded)
Selection [aes]: 1
Select key bytes:
 1) 16
 2) 32
 3) 24
Selection [16]: 1
Enable plaintext passthrough (y/n) [n]: y
Enable filename encryption (y/n) [n]: y
Filename Encryption Key (FNEK) Signature [aaaaaaaaaaaaaaaa]: bbbbbbbbbbbbbbbb
Attempting to mount with the following options:
  ecryptfs_unlink_sigs
  ecryptfs_fnek_sig=bbbbbbbbbbbbbbbb
  ecryptfs_passthrough
  ecryptfs_key_bytes=16
  ecryptfs_cipher=aes
  ecryptfs_sig=aaaaaaaaaaaaaaaa
Mounted eCryptfs

~ $ sudo ls -alF /home/bob
total 28
drwx------ 5 1000 1000 4096 2010-09-03 20:18 ./
drwxr-xr-x 4 root root 80 2010-12-12 03:30 ../
lrwxrwxrwx 1 1000 1000 56 2010-05-24 05:55 Access-Your-Private-Data.desktop -> /usr/share/ecryptfs-utils/ecryptfs-mount-private.desktop
-rw------- 1 1000 1000 214 2010-09-03 20:18 .bash_history
drwx------ 3 1000 1000 4096 2010-07-16 03:29 .cache/
lrwxrwxrwx 1 1000 1000 29 2010-05-24 05:55 .ecryptfs -> /home/.ecryptfs/bob/.ecryptfs
-rw------- 1 1000 1000 16 2010-09-03 20:18 .esd_auth
drwx------ 2 1000 1000 4096 2010-11-12 20:00 .gconfd/
lrwxrwxrwx 1 1000 1000 28 2010-05-24 05:55 .Private -> /home/.ecryptfs/bob/.Private
drwx------ 2 1000 1000 4096 2010-11-30 02:18 .pulse/
-rw------- 1 1000 1000 256 2010-09-03 20:18 .pulse-cookie
lrwxrwxrwx 1 1000 1000 52 2010-05-24 05:55 README.txt -> /usr/share/ecryptfs-utils/ecryptfs-mount-private.txt

~ $ sudo ecryptfs-mount-private
ERROR: Encrypted private directory is not setup properly

Revision history for this message
Serge Hallyn (serge-hallyn) said :
#3

Quoting COKEDUDE (<email address hidden>):
> Question #137488 on eCryptfs changed:
> https://answers.launchpad.net/ecryptfs/+question/137488
>
> Status: Answered => Open
>
> COKEDUDE is still having a problem:
> Ok I'm getting closer. I mounted it but I can't see my data.
>
> ~ $ sudo mount -t ecryptfs /media/4fa4e92e-3532-48fd-a83d-6ea340a669b6/bob /home/bob

How did the data under /media/4fa4e92e-3532-48fd-a83d-6ea340a669b6/bob
originally get set up? If you were using ecryptfs-mount-private, then
perhaps only /media/4fa4e92e-3532-48fd-a83d-6ea340a669b6/bob/.Private was
actually an ecryptfs directory?

What does 'ls -laF /media/4fa4e92e-3532-48fd-a83d-6ea340a669b6/bob' show?

-serge

Revision history for this message
COKEDUDE (cokedude) said :
#4

When I installed Linux Mint there was a option for "Require my password for login and to decrypt my home folder." I selected that option.

http://i255.photobucket.com/albums/hh133/COKEDUDEUSF/ENCRYPTED_SETUP.png

sudo ls -laF /media/4fa4e92e-3532-48fd-a83d-6ea340a669b6/bob
total 32
drwx------ 5 1000 1000 4096 2010-09-03 20:18 ./
drwxr-xr-x 8 root root 4096 2010-08-21 22:16 ../
lrwxrwxrwx 1 1000 1000 56 2010-05-24 05:55 Access-Your-Private-Data.desktop -> /usr/share/ecryptfs-utils/ecryptfs-mount-private.desktop
-rw------- 1 1000 1000 214 2010-09-03 20:18 .bash_history
drwx------ 3 1000 1000 4096 2010-07-16 03:29 .cache/
lrwxrwxrwx 1 1000 1000 29 2010-05-24 05:55 .ecryptfs -> /home/.ecryptfs/bob/.ecryptfs
-rw------- 1 1000 1000 16 2010-09-03 20:18 .esd_auth
drwx------ 2 1000 1000 4096 2010-11-12 20:00 .gconfd/
lrwxrwxrwx 1 1000 1000 28 2010-05-24 05:55 .Private -> /home/.ecryptfs/bob/.Private
drwx------ 2 1000 1000 4096 2010-11-30 02:18 .pulse/
-rw------- 1 1000 1000 256 2010-09-03 20:18 .pulse-cookie
lrwxrwxrwx 1 1000 1000 52 2010-05-24 05:55 README.txt -> /usr/share/ecryptfs-utils/ecryptfs-mount-private.txt

The .Private in that folder is a broken symlink. Not sure if that is important.

Revision history for this message
Serge Hallyn (serge-hallyn) said :
#5

Please provide the output - withOUT any ecryptfs mounts - of:

ls -laF /media/4fa4e92e-3532-48fd-a83d-6ea340a669b6/bob
ls -laF /home/.ecryptfs
ls -laF /home.ecryptfs/bob
ls -laF /home/bob

Revision history for this message
COKEDUDE (cokedude) said :
#6

Not sure if you have been able to figure this out, but all of this is from a live cd.

How do the last 3 "ls's" help you? It doesn't give you any information when you don't mount it. Here is the output.

mint@mint ~ $ ls -laF /media/4fa4e92e-3532-48fd-a83d-6ea340a669b6/bob
ls: cannot open directory /media/4fa4e92e-3532-48fd-a83d-6ea340a669b6/bob: Permission denied
mint@mint ~ $ sudo ls -laF /media/4fa4e92e-3532-48fd-a83d-6ea340a669b6/bob
total 32
drwx------ 5 1000 1000 4096 2010-09-03 20:18 ./
drwxr-xr-x 8 root root 4096 2010-08-21 22:16 ../
lrwxrwxrwx 1 1000 1000 56 2010-05-24 05:55 Access-Your-Private-Data.desktop -> /usr/share/ecryptfs-utils/ecryptfs-mount-private.desktop
-rw------- 1 1000 1000 214 2010-09-03 20:18 .bash_history
drwx------ 3 1000 1000 4096 2010-07-16 03:29 .cache/
lrwxrwxrwx 1 1000 1000 29 2010-05-24 05:55 .ecryptfs -> /home/.ecryptfs/bob/.ecryptfs
-rw------- 1 1000 1000 16 2010-09-03 20:18 .esd_auth
drwx------ 2 1000 1000 4096 2010-11-12 20:00 .gconfd/
lrwxrwxrwx 1 1000 1000 28 2010-05-24 05:55 .Private -> /home/.ecryptfs/bob/.Private
drwx------ 2 1000 1000 4096 2010-11-30 02:18 .pulse/
-rw------- 1 1000 1000 256 2010-09-03 20:18 .pulse-cookie
lrwxrwxrwx 1 1000 1000 52 2010-05-24 05:55 README.txt -> /usr/share/ecryptfs-utils/ecryptfs-mount-private.txt
mint@mint ~ $ ls -laF /home/.ecryptfs
ls: cannot access /home/.ecryptfs: No such file or directory
mint@mint ~ $ sudo ls -laF /home/.ecryptfs
ls: cannot access /home/.ecryptfs: No such file or directory
mint@mint ~ $ sudo ls -laF /home/.ecryptfs/bob
ls: cannot access /home/.ecryptfs/bob: No such file or directory
mint@mint ~ $ sudo ls -laF /home.ecryptfs/bob
ls: cannot access /home.ecryptfs/bob: No such file or directory
mint@mint ~ $ ls -laF /home/bob
ls: cannot access /home/bob: No such file or directory
mint@mint ~ $ sudo ls -laF /home/bob
ls: cannot access /home/bob: No such file or directory
mint@mint ~ $

Revision history for this message
Serge Hallyn (serge-hallyn) said :
#7

Quoting COKEDUDE (<email address hidden>):
> Question #137488 on eCryptfs changed:
> https://answers.launchpad.net/ecryptfs/+question/137488
>
> Status: Needs information => Open
>
> COKEDUDE gave more information on the question:
> Not sure if you have been able to figure this out, but all of this is
> from a live cd.

Right, but I didn't know how long-lasting and customized of a livecd
enviroment you had. You can have persistent home storage on a
liveusb, for instance.

Can you also give me:

sudo ls -laF /media/4fa4e92e-3532-48fd-a83d-6ea340a669b6/.ecryptfs

Revision history for this message
COKEDUDE (cokedude) said :
#8

~ $ sudo ls -laF /media/4fa4e92e-3532-48fd-a83d-6ea340a669b6/.ecryptfstotal 12
drwxr-xr-x 3 root root 4096 2010-05-24 05:55 ./
drwxr-xr-x 8 root root 4096 2010-08-21 22:16 ../
drwxr-xr-x 4 1000 1000 4096 2010-05-24 05:55 bob/

Revision history for this message
Serge Hallyn (serge-hallyn) said :
#9

Quoting COKEDUDE (<email address hidden>):
> Question #137488 on eCryptfs changed:
> https://answers.launchpad.net/ecryptfs/+question/137488
>
> Status: Answered => Open
>
> COKEDUDE is still having a problem:
> ~ $ sudo ls -laF /media/4fa4e92e-3532-48fd-a83d-6ea340a669b6/.ecryptfstotal 12
> drwxr-xr-x 3 root root 4096 2010-05-24 05:55 ./
> drwxr-xr-x 8 root root 4096 2010-08-21 22:16 ../
> drwxr-xr-x 4 1000 1000 4096 2010-05-24 05:55 bob/

Yeah so you probably want to do:

mount -t ecryptfs /media/4fa4e92e-3532-48fd-a83d-6ea340a669b6/.ecryptfs/bob /home/bob

Revision history for this message
COKEDUDE (cokedude) said :
#10

No luck.

mint@mint ~ $ sudo mount -t ecryptfs /media/4fa4e92e-3532-48fd-a83d-6ea340a669b6/.ecryptfs/bob /home/bob
Passphrase:
Select cipher:
 1) aes: blocksize = 16; min keysize = 16; max keysize = 32 (not loaded)
 2) blowfish: blocksize = 16; min keysize = 16; max keysize = 56 (not loaded)
 3) des3_ede: blocksize = 8; min keysize = 24; max keysize = 24 (not loaded)
 4) twofish: blocksize = 16; min keysize = 16; max keysize = 32 (not loaded)
 5) cast6: blocksize = 16; min keysize = 16; max keysize = 32 (not loaded)
 6) cast5: blocksize = 8; min keysize = 5; max keysize = 16 (not loaded)
Selection [aes]: 1
Select key bytes:
 1) 16
 2) 32
 3) 24
Selection [16]: 1
Enable plaintext passthrough (y/n) [n]: n
Enable filename encryption (y/n) [n]: y
Filename Encryption Key (FNEK) Signature [3bacfa4dde6b90dd]: 745a27cdd43c0a62
Attempting to mount with the following options:
  ecryptfs_unlink_sigs
  ecryptfs_fnek_sig=745a27cdd43c0a62
  ecryptfs_key_bytes=16
  ecryptfs_cipher=aes
  ecryptfs_sig=3bacfa4dde6b90dd
Mounted eCryptfs
mint@mint ~ $ ls -laF home/bobls: cannot access home/bob: No such file or directory
mint@mint ~ $ sudo ls -laF home/bob
ls: cannot access home/bob: No such file or directory
mint@mint ~ $ sudo ls -laF /home/bob
total 36
drwxr-xr-x 4 1000 1000 4096 2010-05-24 05:55 ./
drwxr-xr-x 4 root root 80 2010-12-16 22:36 ../
drwx------ 2 1000 1000 4096 2010-05-24 05:55 .ecryptfs/
drwx------ 92 1000 1000 28672 2010-12-09 06:12 .Private/

Revision history for this message
Serge Hallyn (serge-hallyn) said :
#11

Quoting COKEDUDE (<email address hidden>):
> mint@mint ~ $ sudo mount -t ecryptfs /media/4fa4e92e-3532-48fd-a83d-6ea340a669b6/.ecryptfs/bob /home/bob

...

> mint@mint ~ $ sudo ls -laF /home/bob

Sorry, perhaps you wanted to do:

 sudo mount -t ecryptfs /media/4fa4e92e-3532-48fd-a83d-6ea340a669b6/.ecryptfs/bob/.ecryptfs /home/bob

Can you give the output of

find /media/4fa4e92e-3532-48fd-a83d-6ea340a669b6/.ecryptfs/bob/ -maxdepth 2

?

Revision history for this message
Juan Rodiles (rodiles23) said :
#12

I had an error when I logged in with my user due a password change. By error I deleted the files under .ecryptfs directory and I lost all the configuration. I have tried mounting manually my private directory but I can't see the files unencrypted. I followed this procedure: http://www.kaijanmaki.net/2009/10/26/recovering-files-from-ecryptfs-encrypted-home/

    I think that my problem is that the passphrase I am using is wrong, but I don't remember the key that I used when I installed the system. I read that utilities like nasty and rephrase could help to recover my key.

    For me it's very important to recover my files, I need them for my job. I will die if I can't recover them :( . Is there any method to decrypt my files and back them up? Thank you very much in advance.

Can you help with this problem?

Provide an answer of your own, or ask COKEDUDE for more information if necessary.

To post a message you must log in.