Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it possible to setup ecryptfs mounts to prompt for password upon bootup? Say for example /home and /var are ecryptfs folders that need to be mounted; how do I force a prompt upon bootup to ask for mount passwords?

share|improve this question
This can depend on the distribution, what distribution are you using? Also, do you insist on ecryptfs, or will dmcrypt do? Ecryptfs is more geared towards mounting user directories, with the password supplied by the user, while dmcrypt is geared towards encrypting system areas, and the prompting would happen automatically with dmcrypt-aware installers. – Gilles Jul 11 '13 at 13:29
dm-crypt sounds like it may be better for partitions then? – jersten Jul 12 '13 at 20:56
Yes, dmcrypt would be the natural way of doing this. – Gilles Jul 12 '13 at 21:33
up vote 2 down vote accepted

Solution is to use luks/dm-crypt and then modify /etc/crypttab file to do what I need.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.