adduser --encrypt-home fails : mount: mount(2) failed: No such file or directory

Bug #1435514 reported by Scott Moser
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ecryptfs-utils (Ubuntu)
New
Undecided
Unassigned

Bug Description

I launched a fresh vivid cloud image, and then the following.
Note, that 'haveged' is just so I dont have to wait forever for entropy.

$ sudo apt-get update -qy
$ sudo apt-get install -qy haveged ecryptfs-utils

Then, attempt to add a new user with encrypted home directory:
$ sudo adduser --encrypt-home user1
Adding user `user1' ...
Adding new group `user1' (1001) ...
Adding new user `user1' (1001) with group `user1' ...
Creating home directory `/home/user1' ...
Setting up encryption ...

************************************************************************
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.
************************************************************************

Done configuring.

mount: mount(2) failed: No such file or directory
ERROR: Could not mount
adduser: `/usr/bin/ecryptfs-setup-private -b -u user1' returned error code 1. Exiting.
ubuntu@vivid-20150323-191058:~$ sudo deluser --remove-home user1
Looking for files to backup/remove ...
Removing files ...
Removing user `user1' ...
Warning: group `user1' has no more members.
Done.

## Some debug / what happened ##
$ sudo ls /home/
ubuntu user1

$ sudo ls -l /home/
total 8
drwxr-xr-x 6 ubuntu ubuntu 4096 Mar 23 19:23 ubuntu
dr-x------ 2 user1 user1 4096 Mar 23 19:21 user1

$ sudo ls -l /home/user1
total 0
lrwxrwxrwx 1 user1 user1 56 Mar 23 19:21 Access-Your-Private-Data.desktop -> /usr/share/ecryptfs-utils/ecryptfs-mount-private.desktop
lrwxrwxrwx 1 user1 user1 52 Mar 23 19:21 README.txt -> /usr/share/ecryptfs-utils/ecryptfs-mount-private.txt

$ sudo ls -l /home/.ecryptfs/
total 4
drwxr-xr-x 4 user1 user1 4096 Mar 23 19:21 user1
ubuntu@vivid-20150323-191058:~$ sudo ls -l /home/.ecryptfs/user1/
total 0

$ sudo find /home/.ecryptfs/ -type f | sudo xargs ls -l
-rw-r--r-- 1 user1 user1 0 Mar 23 19:21 /home/.ecryptfs/user1/.ecryptfs/auto-mount
-rw-r--r-- 1 user1 user1 0 Mar 23 19:21 /home/.ecryptfs/user1/.ecryptfs/auto-umount
-rw------- 1 user1 user1 12 Mar 23 19:21 /home/.ecryptfs/user1/.ecryptfs/Private.mnt
-rw------- 1 user1 user1 34 Mar 23 19:21 /home/.ecryptfs/user1/.ecryptfs/Private.sig

ProblemType: Bug
DistroRelease: Ubuntu 15.04
Package: ecryptfs-utils 106-0ubuntu1
ProcVersionSignature: Ubuntu 3.19.0-9.9-generic 3.19.1
Uname: Linux 3.19.0-9-generic x86_64
ApportVersion: 2.16.2-0ubuntu4
Architecture: amd64
Date: Mon Mar 23 19:21:34 2015
Ec2AMI: ami-0000025b
Ec2AMIManifest: FIXME
Ec2AvailabilityZone: nova
Ec2InstanceType: m1.small
Ec2Kernel: aki-00000002
Ec2Ramdisk: ari-00000002
ProcEnviron:
 TERM=screen
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: ecryptfs-utils
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Scott Moser (smoser) wrote :
Revision history for this message
Scott Moser (smoser) wrote :

Just reproduced this on trusty also.
I'm guessing this is luser error, but not sure how I'm supposed to do this .

Revision history for this message
Scott Moser (smoser) wrote :

Tyler Hicks suggested:
  https://bugs.launchpad.net/ecryptfs/+bug/1328689/comments/5

And that does work around.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.