James PK's Technical Journal

[ Home | Journal ]


Thu, 03 Apr 2014

Encrypting a directory with ecryptfs

I needed to encrypt a directory on laptop quickly & with the minimum of fuss. So rather than re-partition drives etc (necessary for some encryption types) I used ecryptfs, which is relatively quick & straight forward to set up.

root@sal:~# apt-get install ecryptfs-utils
root@sal:~# modprobe ecryptfs
jamespk@sal:~$ ecryptfs-setup-private
Enter your login passphrase [jamespk]: #login password
Enter your mount passphrase [leave blank to generate one]:

************************************************************************
YOU SHOULD RECORD YOUR MOUNT PASSPHRASE AND STORE IT IN A SAFE LOCATION.
  ecryptfs-unwrap-passphrase ~/.ecryptfs/wrapped-passphrase
THIS WILL BE REQUIRED IF YOU NEED TO RECOVER YOUR DATA AT A LATER TIME.
************************************************************************

Logout, and log back in to begin using your encrypted directory.

All fairly straight forward, *but* I came across this warning: here https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=590081 It seems that when Debian installs ecryptfs, it does not add it to /etc/modules, which is important as that link suggests that you might well get locked out of your desktop. So make sure you add a line for `ecryptfs` in /etc/modules.

posted at: 00:00 | path: /cryptography | permanent link to this entry


Made with Pyblosxom