ecryptfs team mailing list archive
-
ecryptfs team
-
Mailing list archive
-
Message #00429
[Bug 302870] Re: add support for setting up encrypted home directory on user creation
Martin,
I actually tested the absence of ecryptfs-setup-private... It's sort of handled by:
my $ecryptfs_setup_private = &which('ecryptfs-setup-private')
It says:
adduser: Could not find program named 'ecryptfs-setup-private' in $PATH
We could emit another message, about apt-get install ecryptfs-utils, but
I figured the user should be able to figure that out with command-not-
found. (Perhaps even adduser's which() function should be taught to
call command-not-found???)
However, the failed which() call exits adduser immediately, $?=1, which
has succeeded in adding the user, but not in populating the home
directory. Should it purge the user on failed exit?
For the adduser.conf request, I filed Bug #305582 and assigned to
myself. I'll submit another patch for that.
:-Dustin
--
add support for setting up encrypted home directory on user creation
https://bugs.launchpad.net/bugs/302870
You received this bug notification because you are a member of eCryptfs,
which is subscribed to ecryptfs-utils in ubuntu.
Status in eCryptfs - Enterprise Cryptographic Filesystem: Fix Released
Status in “adduser” source package in Ubuntu: In Progress
Status in “ecryptfs-utils” source package in Ubuntu: Fix Released
Status in “gnome-system-tools” source package in Ubuntu: Triaged
Status in “system-tools-backends” source package in Ubuntu: Invalid
Bug description:
Binary package hint: adduser
I'm currently adding support for bootstrapping an encrypted home directory to the ecryptfs-setup-private utility in the ecryptfs-utils package.
This requires a simple patch to the adduser utility, to support an "--encrypt-home" option, which would call:
# ecryptfs-setup-private -b -u $USER
The call to ecryptfs-setup-private uses the existing code to setup an encrypted home directory. It will generate a mount passphrase from /dev/urandom, establish the user's ecryptfs configuration files, mount the home directory, and return 0. With the home directory mounted, adduser can proceed to copy the /etc/skel files into the mounted, encrypted mountpoint. The adduser utility then needs to unmount that home directory. The "passwd" call within adduser will trigger the password-change code within pam_ecryptfs.so, which will detect the cleartext, randomly generated mount passphrase written to file, and wrap (ie, encrypt) that file using the chosen passphrase.
This patch also adds documentation to the manpage regarding the new --encrypt-home option.
Finally, this patch modifies the control file to "Recommend" a version of ecryptfs-utils with the required new functionality. Note that Colin said he needs to think about the appropriate level (Recommends vs. Suggests).
:-Dustin