I like to use lots of different ecryptfs directories. I tend to have at least one local one per machine plus one on Ubuntu one, and more. I also like to only have those mounted when I’m using them.
So I wrote a new little tool in my version of ecryptfs-utils, emount. You can find it at ppa:serge-hallyn/ecryptfs. Here is how to use it. Let’s say I usually do
sudo mount -t ecryptfs ~/Ubuntu\ One/gtd ~/gtd
Now I want to be able to do ’emount g’. I create ~/.ecryptfs/g.conf,
which contains a valid fstab entry:
/home/serge/Ubuntu\040One/gtd /home/serge/gtd ecryptfs none 0 0
(Note, that should read the word ‘Ubuntu’, followed by a backslash and the numbers zero four zero, followed by the word One. Google a bit for the troubles wordpress has with backslash zero 🙂 )
I create a passphrase signature file g.sig using:
For the wrapping passphrase, you might want to use your login password,
but at any case this is the passphrase which you will load into your
kernel keychain, which mount will use to unwrap the ecryptfs passphrase
to effect the mount.
Every time I log in, I
Passphrase: (The real passphrase)
Passphrase: (The wrapping passphrase)
I’ll probably want the pam_ecryptfs.so library to help with loading
the passphrase, but haven’t worried about that yet.
Now, I can just ’emount g’ to mount, and ‘eumount g’ to unmount
it. Notice that I can add any new mounts that I want without needing