2

I think I need to add a key from the user keyring to the kernel keyring on login for this, but let me just explain the whole thing:

I have a custom ecryptfs directory set up with a huge annoying passphrase, because Ubuntu refuses to implement support for key files:

2011: Unfortunately, we're not building ecryptfs against ssl at this time, due to license incompatibilities (as noted below). I'm going to leave this bug open, though, and try and get those sorted out.

2012: there are no plans to improve this feature in the near term. It is a considerable amount of work, yet no developers have shown interest in the feature.

I want to mount/'unlock' this ecryptfs directory automatically when I log in, without having to enter this annoying passphrase manually. With an encrypted home in Ubuntu (also ecryptfs) this happens with a key that is unwrapped using the login password, but this does not work for custom mounts.

For other uses (e.g. LUKS) you can simply store the key/passphrase in your user keyring. But because ecryptfs works in the kernel, this key needs to be stored in the kernel keyring, not the user keyring.

Manually, you would add the key to the kernel keyring using ecryptfs-add-passphrase or ecryptfs-manager, after which you can mount and unmount the ecryptfs directory as much as you want. But after a reboot, this key is gone again, and with good reason.

But I want it back automatically after I login with my user so I can mount/unmount the ecryptfs directory again without having to enter it's password. How can I do this?

update

On Archlinux there is this tool called ecryptfs-simple developed specifically for this purpose: ecryptfs-simple is a utility for users that want to work with eCryptfs in the simplest way possible. The idea is to make eCryptfs as easy to use as EncFS.

Apparently, you can setup automatic mounting with ecryptfs-simple -a, but this tool is not available for Ubuntu, and I don't know if this setup survives a reboot.

4

2 に答える 2

0

パスフレーズをどこかに保存する必要があり、ファイルシステムを自動的にマウントできます。しかし、キーをローカルに保存するのはおそらく悪い考えです。

于 2013-01-03T13:00:31.273 に答える