Lucky you! I just had the same problem and wrote a script that will facilitate mounting ecryptfs Folders with FNEK.
sudo su -
Then open nano/vim/your editor of choice and create a file
ecryptfs-fnek-helper.sh with the following contents:
# Thanks to https://bugs.launchpad.net/ubuntu/+source/ecryptfs-utils/+bug/455709
echo "Where is the /home with the .ecryptfs mounted? (default=/mnt/home)"
if [ -z "$home_ecryptfs" ]; then
echo "Whose encrypted home would you like to mount?"
if [ -z "$user" ]; then
echo "You have to enter a user!"
echo "What is the user's password?"
read -s password
if [ -z "$password" ]; then
echo "You have to enter a password!"
echo "Where would you like to mount it? (Default: /mnt/[username])"
if [ -z "$target" ]; then
mkdir -p $target
echo I will be mounting $private into $target.
echo "Clearing the keyring."
keyctl clear @u
keyctl list @u
echo "Unwrapping passphrase and inserting it into key:"
printf "%s" $password | ecryptfs-insert-wrapped-passphrase-into-keyring $wrapped -
keyctl list @u
echo -e "\e[0;92mPassphrase:"
echo -e '\e[1;92m'`printf "%s" $password | ecryptfs-unwrap-passphrase $wrapped - `'\e[0m'
echo -e "\e[0;96mFilename Encryption Key (FNEK) Signature:"
echo -e '\e[1;96m'`tail -n1 $sig`'\e[0m'
echo -e "Mounting now! Be sure to enable FNEK!"
mount.ecryptfs $private $target -o ecryptfs_cipher=aes,ecryptfs_key_bytes=16,key=passphrase
This will unwrap your passphrase and add it to the keyring. It will also display the passhprase and the correct FNEK signature, so you can copy/paste them when prompted by mount.ecryptfs.
Make the file executable and run it while still in su:
chmod +x ecryptfs-fnek-helper.sh