User:Aries97/Scratch Pad/Mount Encrypted Ubuntu Home Directory

Introduction
'''Ubuntu allows users to encrypt their home directories upon installation. With the decryption passphrase it is fairly easy to access these files from a Gentoo installation.'''

ecryptfs setup
The files and filenames are individually encrypted using ecryptfs. Enable ecryptfs in the kernel:

The wiki has an excellent set of instructions: https://wiki.gentoo.org/wiki/Ecryptfs

The short version:

Reboot!

Install the ecrypt file system utilitys:

Locating the files
Locate the Ubuntu encrypted home directory for decryption. If the home directory is on an external hard drive Gentoo may have automagically mounted it at ""

As an example we will use: ""

The decryption target would then be the users home directory: ""

That folder is, however, empty; except for some symbolic links. Ubuntu puts the encrypted home directory files in a different directory; which is then decrypted and mounted back on the home directory by ecryptfs. All of the encrypted files for our example are located here: ""

Filename Encryption
Generate the filename encryption key; it can be derived from the passphrase. Add the passphrase to "the keyring", with the --fnek option and the filename encryption key will be generated. It will be output as the second hexadecimal number in brackets:

The example filename encryption key is 91f6e7ae96b0047e

Decrypt and mount
Helpful links:

https://wiki.gentoo.org/wiki/Ecryptfs

https://help.ubuntu.com/community/EncryptedPrivateDirectory#Live_CD_method_of_opening_a_encrypted_home_directory