Ask Ubuntu is a question and answer site for Ubuntu users and developers. 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

Just trying to set up a secondary user after install on 12.04. My last system was 10.04 and it allowed me to create a new user with an encrypted home partition but when creating a new user on 12.04 there is no option to encrypt home partition. Do I need to install another package or am I missing something?

share|improve this question

It is a bug of 12.04, see here.

You can workaround creating the user from terminal. The command is:
adduser --encrypt-home username (change "username" for the user name you want).

share|improve this answer
The --encrypt-home switch is also missing. $ sudo useradd --encrypt-home newuser useradd: unrecognised option '--encrypt-home' $ uname -a Linux username -VGN-FZ11S 3.2.0-24-generic-pae ... i686 i686 i386 GNU/Linux – user61193 May 7 '12 at 2:23
Thanks for the reply, I will give this a try soon. – user60876 May 17 '12 at 6:22
@Richard Did you run useradd or adduser? Both commands exist, but adduser is the one you want. (Also you'll need to run it as root with sudo, i.e., sudo adduser --encrypt-home username.) – Eliah Kagan Jun 1 '12 at 5:42
for 15.10 I had to install package ecryptfs-utils before I could use --encrypt-home – Jim Ford Mar 1 at 16:10

This seems to be fixed at the command line level.

sudo adduser --encrypt-home username 

(Change "username" for the user name you want.)

Just worked for me in an up to date 12.04 Precise Pangolin created a new user with an encrypted home directory.

If you receive an error message :

adduser: unable to find a program named « ecryptfs-setup-private » in $PATH"...

Adding the package « ecryptfs-utils » solves this problem (thanks, apt-file...) :

apt-get install ecryptfs-utils
share|improve this answer

You just need another user & group admin tool:

sudo apt-get install gnome-system-tools

Then go to dash and search for Users and Groups. Add a new user and check "Encrypt home folder to protect sensitive data". Remember to take extra precautions if you don't want sensitive data to leak into the log files (eg. /var/log/), temp files (eg. /tmp), the swap space, etc.

share|improve this answer
Doesn't seem to work under 14.04. – detly Jan 15 '15 at 9:46

It doesn't work for me from 14.04.2 LTS .... if you manually add the user to the ecryptfs group, then it will set up the encrypted dirs and meta-data. Nowhere can I find a description of how the ecryptfs login works - at a guess, it seems to look for membership of a group called ecryptfs, but even though I have that, the automatic mount of the encrypted home dir created with the above process does not work.

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.