adduser --encrypt-home fails : mount: mount(2) failed: No such file or directory
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-
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/
ubuntu@
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-
lrwxrwxrwx 1 user1 user1 52 Mar 23 19:21 README.txt -> /usr/share/
$ sudo ls -l /home/.ecryptfs/
total 4
drwxr-xr-x 4 user1 user1 4096 Mar 23 19:21 user1
ubuntu@
total 0
$ sudo find /home/.ecryptfs/ -type f | sudo xargs ls -l
-rw-r--r-- 1 user1 user1 0 Mar 23 19:21 /home/.
-rw-r--r-- 1 user1 user1 0 Mar 23 19:21 /home/.
-rw------- 1 user1 user1 12 Mar 23 19:21 /home/.
-rw------- 1 user1 user1 34 Mar 23 19:21 /home/.
ProblemType: Bug
DistroRelease: Ubuntu 15.04
Package: ecryptfs-utils 106-0ubuntu1
ProcVersionSign
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
Ec2Availability
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)
Just reproduced this on trusty also.
I'm guessing this is luser error, but not sure how I'm supposed to do this .