Hi,
I only have an encrypted "Private" directory, not a fully encrypted home.
But I think the procedure is pretty similar.
I just successfully tested a recovery procedure on my PC using a Lubuntu 10.04 Live-CD (should work the same way with any ubuntu live-CD supporting your filesystem (ext4 in my case)).
Here are the commands I ran in a terminal after mounting the partition using the graphical browser (which is easier and safer than trying it by command-line):
Code:
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.
ubuntu@ubuntu:~$ sudo ecryptfs-add-passphrase --fnek
Passphrase:
ubuntu@ubuntu:~$ cd /media/e81ca359-a0ee-4357-9748-972b95db85a7/
ubuntu@ubuntu:/media/e81ca359-a0ee-4357-9748-972b95db85a7$ ls
guest lost+found KIAaze pierre
ubuntu@ubuntu:/media/e81ca359-a0ee-4357-9748-972b95db85a7$ cd KIAaze/
bash: cd: KIAaze/: Permission denied
ubuntu@ubuntu:/media/e81ca359-a0ee-4357-9748-972b95db85a7$ ls
guest lost+found KIAaze pierre
ubuntu@ubuntu:/media/e81ca359-a0ee-4357-9748-972b95db85a7$ cd KIAaze/
bash: cd: KIAaze/: Permission denied
ubuntu@ubuntu:/media/e81ca359-a0ee-4357-9748-972b95db85a7$ su
Password:
su: Authentication failure
ubuntu@ubuntu:/media/e81ca359-a0ee-4357-9748-972b95db85a7$ sudo cd KIAaze
sudo: cd: command not found
ubuntu@ubuntu:/media/e81ca359-a0ee-4357-9748-972b95db85a7$ sudo passwd
Enter new UNIX password:
Retype new UNIX password:
passwd: Authentication token manipulation error
passwd: password unchanged
ubuntu@ubuntu:/media/e81ca359-a0ee-4357-9748-972b95db85a7$ sudo su
root@ubuntu:/media/e81ca359-a0ee-4357-9748-972b95db85a7# cd KIAaze/
root@ubuntu:/media/e81ca359-a0ee-4357-9748-972b95db85a7/KIAaze# ls .Private/
ECRYPTFS_FNEK_ENCRYPTED.FWagQTJl3Ep66UQlWWWJ5yUc-aBdjpC2nxAR4zh4KMkZKlfT4v-eHm.3Ok--
ECRYPTFS_FNEK_ENCRYPTED.FWagQTJl3Ep66U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S_FNEK_ENCRYPTED.FWagQTJl3Ep66UQlWWWJ5yUc-aBdjpC2nxARZVyCVc7IAOHTXF4LDXqx6k--
root@ubuntu:/media/e81ca359-a0ee-4357-9748-972b95db85a7/KIAaze# ls Private
Access-Your-Private-Data.desktop README.txt
root@ubuntu:/media/e81ca359-a0ee-4357-9748-972b95db85a7/KIAaze# cat Private/Access-Your-Private-Data.desktop
[Desktop Entry]
_Name=Access Your Private Data
_GenericName=Access Your Private Data
Exec=/usr/bin/ecryptfs-mount-private
Terminal=true
Type=Application
Categories=System;Security;
X-Ubuntu-Gettext-Domain=ecryptfs-utils
root@ubuntu:/media/e81ca359-a0ee-4357-9748-972b95db85a7/KIAaze# ls .ecryptfs/
auto-mount auto-umount Private.mnt Private.sig wrapped-passphrase
root@ubuntu:/media/e81ca359-a0ee-4357-9748-972b95db85a7/KIAaze# ls .ecryptfs/wrapped-passphrase
.ecryptfs/wrapped-passphrase
root@ubuntu:/media/e81ca359-a0ee-4357-9748-972b95db85a7/KIAaze# ecryptfs-unwrap-passphrase .ecryptfs/wrapped-passphrase
Passphrase:
PASSPHRASE
root@ubuntu:/media/e81ca359-a0ee-4357-9748-972b95db85a7/KIAaze#
root@ubuntu:/media/e81ca359-a0ee-4357-9748-972b95db85a7/KIAaze# ecryptfs-add-passphrase --fnek
Passphrase:
Inserted auth tok with sig [2b511591c079c7e9] into the user session keyring
Inserted auth tok with sig [ac71f571150d4822] into the user session keyring
root@ubuntu:/media/e81ca359-a0ee-4357-9748-972b95db85a7/KIAaze# mount -t ecryptfs ./.Private/ ./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]:
Select key bytes:
1) 16
2) 32
3) 24
Selection [16]:
Enable plaintext passthrough (y/n) [n]:
Enable filename encryption (y/n) [n]: y
Filename Encryption Key (FNEK) Signature [2b511591c079c7e9]: ac71f571150d4822
Attempting to mount with the following options:
ecryptfs_unlink_sigs
ecryptfs_fnek_sig=ac71f571150d4822
ecryptfs_key_bytes=16
ecryptfs_cipher=aes
ecryptfs_sig=2b511591c079c7e9
WARNING: Based on the contents of [/root/.ecryptfs/sig-cache.txt],
it looks like you have never mounted with this key
before. This could mean that you have typed your
passphrase wrong.
Would you like to proceed with the mount (yes/no)? : yes
Would you like to append sig [2b511591c079c7e9] to
[/root/.ecryptfs/sig-cache.txt]
in order to avoid this warning in the future (yes/no)? : no
Not adding sig to user sig cache file; continuing with mount.
Mounted eCryptfs
root@ubuntu:/media/e81ca359-a0ee-4357-9748-972b95db85a7/KIAaze# ls Private/
root@ubuntu:/media/e81ca359-a0ee-4357-9748-972b95db85a7/KIAaze# ls -A Private/
.amsn .dropbox .gnupg .mozilla .purple .SpiderOak .sylpheed-2.0 .xchat2
.config .dropbox-dist .macromedia .opera .Skype .ssh .wicd
root@ubuntu:/media/e81ca359-a0ee-4357-9748-972b95db85a7/KIAaze# cat ./Private/.config/autostart/xchat.desktop
[Desktop Entry]
Type=Application
Name=xchat
Exec=xchat
Icon=system-run
Comment=
Name[en_US]=xchat
Comment[en_US]=
X-GNOME-Autostart-enabled=false
NotShowIn=LXDE;
root@ubuntu:/media/e81ca359-a0ee-4357-9748-972b95db85a7/KIAaze#
I'm on IRC (#ubuntu@freenode) right now if you want to chat.
Bookmarks