I'am new to pam_mount, I have installed it today and I'am just playing with pmt-ehd to encrypt a container file called "partition" saved in my home directory.
This is the only row I added to /etc/security/pam_mount.conf.xml, as suggested by pmt_ehd:
<volume fstype="crypt" path="/home/andrea/partition" mountpoint="/home/andrea/mm" cipher="aes-cbc-essiv:sha256" fskeycipher="aes-256-cbc" fskeyhash="sha1" fskeypath="/home/andrea/andrea.k" />
Then I have added these two rows to /etc/pam.d/login :
auth optional /lib/security/pam_mount.so
session optional /lib/security/pam_mount.so try_first_pass
Now, everything works out of the box but there is a problem.
If I login and exit, and I login and exit, and again again...more than 10 times, then when I login I get "pam_mount: no free loop device".
That is because the loop devices don't get freed on logout (using losetup -d), but they stay there as I checked out with losetup -a.
Now, is that a BUG or I have missed some options to destroy the loop devices on logout ??
I'am on ArchLinux, pam_mount 2.8-1