After a reboot using magic syst+B, encrypted volume was not marked as unmounted, and was still marked as "mounted" in cmtab. Thus, when logging, user home partition is not mounted. The problem has been solved by deleting cache file /etc/cmtab while no partition was mounted. A solution could be to clean /etc/cmtab within /etc/init.d/localmount Reproducible: Didn't try Actual Results: Feb 1 12:45:15 localhost login[7486]: pam_mount(pam_mount.c:458): pam_mount 1.17: entering session stage Feb 1 12:45:15 localhost login[7486]: pam_mount(pam_mount.c:479): back from global readconfig Feb 1 12:45:15 localhost login[7486]: pam_mount(pam_mount.c:481): per-user configurations not allowed by pam_mount.conf.xml Feb 1 12:45:15 localhost login[7486]: pam_mount(misc.c:38): Session open: (uid=0, euid=0, gid=100, egid=100) Feb 1 12:45:15 localhost login[7486]: pam_mount(rdconf2.c:182): checking sanity of volume record (/dev/sda9) Feb 1 12:45:15 localhost login[7486]: pam_mount(pam_mount.c:536): about to perform mount operations Feb 1 12:45:15 localhost login[7486]: pam_mount(mount.c:181): Mount info: globalconf, user=paxal <volume server="(null)" path="/dev/sda9" mountpoint="/home/paxal" cipher="(null)" fskeypath="(null)" fskeycipher="(null)" fskeyhash="(null)" options="" /> fstab=0 Feb 1 12:45:15 localhost login[7486]: pam_mount(mount.c:474): /dev/sda9 already seems to be mounted at /home/paxal, skipping Expected Results: Feb 1 17:17:12 localhost kdm: :0[5951]: pam_mount(misc.c:38): Session open: (uid=0, euid=0, gid=100, egid=100) Feb 1 17:17:12 localhost kdm: :0[5951]: pam_mount(rdconf2.c:182): checking sanity of volume record (/dev/sda9) Feb 1 17:17:12 localhost kdm: :0[5951]: pam_mount(pam_mount.c:536): about to perform mount operations Feb 1 17:17:12 localhost kdm: :0[5951]: pam_mount(mount.c:181): Mount info: globalconf, user=paxal <volume server="(null)" path="/dev/sda9" mountpoint="/home/paxal" cipher="(null)" fskeypath="(null)" fskeycipher="(null)" fskeyhash="(null)" options="" /> fstab=0 Feb 1 17:17:12 localhost kdm: :0[5951]: pam_mount(mount.c:494): checking for encrypted filesystem key configuration Feb 1 17:17:12 localhost kdm: :0[5951]: pam_mount(mount.c:497): about to start building mount command Feb 1 17:17:12 localhost kdm: :0[5951]: command: [mount.crypt] [/dev/sda9] [/home/paxal] Feb 1 17:17:12 localhost kdm: :0[6314]: pam_mount(misc.c:38): set_myuid<pre>: (uid=0, euid=0, gid=100, egid=100) Feb 1 17:17:12 localhost kdm: :0[6314]: pam_mount(misc.c:38): set_myuid<post>: (uid=0, euid=0, gid=100, egid=100) Feb 1 17:17:13 localhost kdm: :0[5951]: pam_mount(mount.c:75): mount errors: Feb 1 17:17:13 localhost kdm: :0[5951]: pam_mount(mount.c:78): Command successful.
I didn't even get those error messages and I was really puzzled. This is what I did: I upgraded pam_mount from 1.16 to 1.17 and made totally normal shutdown. Apparently the crypted partition haven't got unmounted properly. I had to downgrade pam_mount back to 1.16 to mount the partition.
This has happened to me again (plugged-out the AC without the battery...). Again, removing /etc/cmtab* solved the problem. Installed packages: [ebuild R ] sys-libs/pam-1.0.1 USE="cracklib nls vim-syntax -audit (-selinux) -test" 957 kB [ebuild R ] sys-fs/cryptsetup-1.0.5-r1 USE="nls -dynamic (-selinux)" 315 kB [ebuild R ] sys-auth/pam_mount-1.17 USE="crypt" 316 kB ls -l /etc/make.profile lrwxrwxrwx 1 root root 51 Dec 23 15:07 /etc/make.profile -> ..//usr/portage/profiles/default/linux/amd64/2008.0 What other information could you use?
One more thing: After emerging some packages (my machine was up for 20 days, I don't know which one) and then rebooting XFCE-panel's "exit" applet displayed "exit panel?" instead of showing me the reboot/shutdown/logout options. After downgrading pam_mount from 1.17 to 1.16 normal behaviour is back. The partition mounted by pam_mount is used to store private files and is NOT connected to any user or system settings.
Seems there are some problems with crypto in 1.17, no time to investigate further at the moment, but masked it for now.
After downgrading to pam_mount-1.16 and deleting /etc/cmtab, pam_mount appears to be partially working...I get a message reading pam_mount(mount.c:78): Command successful and logging in as root in a separate terminal confirms that my home directory has been mounted. However, something is still wrong; immediately after the above message, I get a second message: pam_mount(pam_mount.c:539): mount of /dev/sda6 failed This second message makes no sense; as noted, the mount did succeed, as confirmed by the mount command in a separate terminal: # mount ... /dev/sda6 on /home/<username> type crypt (defaults) Also, "ls /home/<username>" retuns exactly what I would expect to find. Why does pam_mount not recognize that the partition mounted? Is there a new format for /etc/security/pam_mount.conf.xml such that adding the following as the second-to-last line is no longer sufficient? <volume user="<username>" fstype="crypt" path="/dev/sda6" mountpoint="/home/<username>/" />
Exactly same problem, When i log i get: pam_mount(mount.c:78): Command successful pam_mount(pam_mount.c:539): mount of /dev/sda6 failed and when i logout i get another error about umounting else@a02-0615c ~ $ mount rootfs on / type rootfs (rw) /dev/root on / type ext4 (rw,noatime,barrier=1,data=ordered) proc on /proc type proc (rw,nosuid,nodev,noexec) rc-svcdir on /lib64/rc/init.d type tmpfs (rw,nosuid,nodev,noexec,size=1024k,mode=755) sysfs on /sys type sysfs (rw,nosuid,nodev,noexec) debugfs on /sys/kernel/debug type debugfs (rw,nosuid,nodev,noexec) udev on /dev type tmpfs (rw,nosuid,size=10240k,mode=755) devpts on /dev/pts type devpts (rw,nosuid,noexec,gid=5,mode=620) shm on /dev/shm type tmpfs (rw,nosuid,nodev,noexec) usbfs on /proc/bus/usb type usbfs (rw,noexec,nosuid,devmode=0664,devgid=85) binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev) /dev/sda3 on /home/else type crypt (defaults) else@a02-0615c ~ $ su pam_mount password: a02-0615c else # cat /etc/cmtab /home/else /dev/sda3 - /dev/mapper/_dev_sda3 a02-0615c else # cat /etc/security/ access.conf group.conf limits.d/ namespace.d/ pam_env.conf time.conf capability.conf limits.conf namespace.conf namespace.init pam_mount.conf.xml a02-0615c else # cat /etc/security/pam_mount.conf.xml <?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE pam_mount SYSTEM "pam_mount.conf.xml.dtd"> <!-- See pam_mount.conf(5) for a description. --> <pam_mount> <!-- Volume definitions --> <!-- pam_mount parameters: General tunables --> <debug enable="0" /> <!-- <luserconf name=".pam_mount.conf.xml" /> --> <!-- Note that commenting out mntoptions will give you the defaults. You will need to explicitly initialize it with the empty string to reset the defaults to nothing. --> <mntoptions allow="nosuid,nodev,loop,encryption,fsck,nonempty,allow_root,allow_other" /> <!-- <mntoptions deny="suid,dev" /> <mntoptions allow="*" /> <mntoptions deny="*" /> --> <mntoptions require="nosuid,nodev" /> <path>/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin</path> <logout wait="0" hup="0" term="0" kill="0" /> <!-- pam_mount parameters: Volume-related --> <volume user="else" fstype="crypt" path="/dev/sda3" mountpoint="/home/else" /> <mkmountpoint enable="1" remove="true" /> </pam_mount> a02-0615c else # emerge pam_mount -pv These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild R ] sys-auth/pam_mount-1.16 USE="crypt" 0 kB Total: 1 package (1 reinstall), Size of downloads: 0 kB a02-0615c else # emerge pam -pv These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild R ] sys-libs/pam-1.0.3 USE="cracklib nls -audit (-selinux) -test -vim-syntax" 987 kB Total: 1 package (1 reinstall), Size of downloads: 987 kB
(In reply to comment #6) > Exactly same problem, When i log i get: > > ... I posted our bug (which honestly isn't really related to this bug here in Gentoo) to the upstream developers (https://sourceforge.net/tracker/?func=detail&atid=430593&aid=2601692&group_id=41452), and they apparently just patched the git source to fix it (http://pam-mount.git.sourceforge.net/git/gitweb.cgi?p=pam-mount;a=commit;h=af4a71feabcb04ecbc7c2aeaf6bf9e9ef8957ae5). Just thought you should know.
With 1.20, everything should be ok now. Please re-open or open a new bug if you still have issues.