pam_ecryptfs should respect ~/.ecryptfs/auto-[u]mount files

Bug #256154 reported by Dustin Kirkland 
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ecryptfs-utils (Ubuntu)
Fix Released
Low
Dustin Kirkland 

Bug Description

Binary package hint: ecryptfs-utils

From user feedback on the https://wiki.ubuntu.com/EncryptedPrivateDirectory wiki page...

 * "I hope there will also be an option for the ~/Private directory to ''not'' be mounted at login"

Additionally, it would be nice to allow a user to "not unmount" ~/Private automatically on logout.

The hooks are already in place in ecryptfs-setup-private to create the ~/.ecryptfs/auto-mount and ~/.ecryptfs/auto-umount files. We simply need to teach pam_ecryptfs to respect that configuration.

:-Dustin

Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Patch attached. I am feeding this back upstream, as well.

:-Dustin

Changed in ecryptfs-utils:
assignee: nobody → kirkland
importance: Undecided → Low
status: New → In Progress
Revision history for this message
Dustin Kirkland  (kirkland) wrote :

The last patch had a build bug.

This one builds, and I have thoroughly tested it to my satisfaction. Requesting sponsorship...

:-Dustin

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ecryptfs-utils - 53-1ubuntu2

---------------
ecryptfs-utils (53-1ubuntu2) intrepid; urgency=low

  * debian/control: add build dependency on dpatch.
  * debian/rules: add relevant patch bits.
  * debian/patches/00list: add 10-pam_ecryptfs-automount.dpatch.
  * debian/patches/10-pam_ecryptfs-automount.dpatch: patch pam_ecryptfs to
    respect ~/.ecryptfs/auto-mount and ~/.ecryptfs/auto-umount files
    (LP: #256154).

 -- Dustin Kirkland <email address hidden> Fri, 08 Aug 2008 13:00:53 -0500

Changed in ecryptfs-utils:
status: In Progress → Fix Released
Revision history for this message
Don Cristóbal (doncristobal) wrote :

I read in the forums (http://ubuntuforums.org/showthread.php?p=7251016#post7251016) that I could just remove the files auto-mount and auto-umount in ~/.ecryptfs/
but this did not work, I could not log in to the GUI any more (I was thrown back to the login screen instead of my desktop environment). So put the two files back from the terminal, and it works again.
The tutorial on https://help.ubuntu.com/community/EncryptedPrivateDirectory does explicitly not cover this issue. I could not find any other information on the subject.

Am I missing something, or should I file a new bug report?

Revision history for this message
Dustin Kirkland  (kirkland) wrote : Re: [Bug 256154] Re: pam_ecryptfs should respect ~/.ecryptfs/auto-[u]mount files

I am not clear on what are you trying to accomplish. Please clarify
exactly what you're trying to do, what does, and does not work, and
where you feel that documentation is lacking.

Thanks.

:-Dustin

Revision history for this message
Don Cristóbal (doncristobal) wrote :

Dustin, thank you for answering.

What I'd like to do: Stop ecryptfs from automatically mounting the private folder when I log in. I'd like to be asked a password (be it my normal user password or the special passphrase) before I get access to ~/Private.
I found the information that I could remove the auto-mount file which would mean that ~/Private would not be mounted automatically.

What happens: After I give my user name and password at the graphical Xfce login screen, the computer does something for 10-20 seconds (hd activity...), quickly shows the black text-only screen with some messages I cannot decipher (too quick), and then just falls back to the very same login screen. I.e.: Login to Xfce is impossible. I have to login to a text-only screen and put the auto-[u]mount files in place again.

Questions:

a) Is the information correct that one can just remove the auto-mount and/or auto-umount files in order to stop ~/Private from being auto-(u)mounted?

b) If not: What should I do instead to get the desired behaviour?

Suggestion:

c) The tutorial on https://help.ubuntu.com/community/EncryptedPrivateDirectory could be completed with the answer to a) and b)

I hope this time it's clearer!

Revision history for this message
Dustin Kirkland  (kirkland) wrote :

> a) Is the information correct that one can just remove the auto-mount
> and/or auto-umount files in order to stop ~/Private from being
> auto-(u)mounted?

Yes. That is accurate.

However, you must ensure that there is nothing stored in your Private
folder that's required to log into your system.

If you keep getting kicked back to a gdm login window, this probably
means that you have stored some information in your ~/Private folder
that is required for logging into XFCE. Some configuration files of
some kind. This is hard for me to debug, since I don't know what's in
your Private folder.

> c) The tutorial on
> https://help.ubuntu.com/community/EncryptedPrivateDirectory could  be
> completed with the answer to a) and b)

Okay.

:-Dustin

Revision history for this message
Don Cristóbal (doncristobal) wrote :

Dustin, thanks again. There have never been any settings in my ~/Private, I just copied some data there to test it. Now I emptied it completely, but logging in to Xfce is still impossible when I delete the two auto-[u]mount files.
Code:
~/Private$ ls -a
. ..
when it is mounted - which means there is really no data at all, am I right?

To be more precise: There was an old backup of a home folder from Jaunty Beta, named home_beta or so; I copied that to Private. But I never pointed any software there. Now I've moved it away. Maybe there was a problem with links inside the old home folder? I removed one to the general examples folder, but that did not change anything.

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.