You are not logged in.

#1 2015-09-23 15:48:35

twelveeighty
Member
From: Alberta, Canada
Registered: 2011-09-04
Posts: 1,096

pam_mount fails to auto mount encrypted drive on startup

<edit: there is a fix presented here for my particular case, I'm asking for clarification on the fix, though>
<edit2 (Oct 22): backing out those changes again from /etc/pam.d/login doesn't cause SDDM to fail, so I assume either this was a bogey or something was fixed - see reply #4>

After upgrading today, which included the updates to systemd 226-1 and dbus 1.10.0-3, my login manager (SDDM) didn't start. Checking my journal, I got a "PAM_MOUNT WAS INVOKED WITH INSUFFICIENT PRIVILEGES" error (see below). I am guessing this has to do with the fact that I have encrypted partitions that should auto mount. I implemented the fix described in https://bbs.archlinux.org/viewtopic.php?id=181559, which works, but since that post was from before the "dbus-daemon" changes in systemd/dbus, I wanted to see if this was still a proper way to address the problem. Here is my current /etc/pam.d/login. I am not sure about the ordering of the entries, so I grouped the new "auth" entries (marked Sep 23) with the existing "auth" one and same with the "session" entries. Is that the proper way?

#%PAM-1.0

auth       required     pam_securetty.so

# Sep 23
auth       required     pam_mount.so
auth       required     pam_unix.so use_first_pass

auth       requisite    pam_nologin.so
auth       include      system-local-login
account    include      system-local-login
session    include      system-local-login

# Sep 23
session    optional     pam_mount.so
session    required     pam_unix.so

Here is the error log from before making the changes to /etc/pam.d/login:

Sep 23 08:51:49 cirdan sddm-greeter[581]: Reading from "/usr/share/xsessions/plasma.desktop"
Sep 23 08:51:49 cirdan sddm[520]: Message received from greeter: Login
Sep 23 08:51:49 cirdan sddm[520]: Reading from "/usr/share/xsessions/plasma.desktop"
Sep 23 08:51:49 cirdan sddm[520]: Session "/usr/share/xsessions/plasma.desktop" selected, command: "/usr/bin/startkde"
Sep 23 08:51:49 cirdan sddm-helper[681]: [PAM] Starting...
Sep 23 08:51:49 cirdan sddm-helper[681]: [PAM] Authenticating...
Sep 23 08:51:49 cirdan sddm-helper[681]: [PAM] Preparing to converse...
Sep 23 08:51:49 cirdan sddm-helper[681]: [PAM] Conversation with 1 messages
Sep 23 08:51:49 cirdan sddm-helper[681]: [PAM] returning.
Sep 23 08:51:49 cirdan sddm[520]: Authenticated successfully
Sep 23 08:51:49 cirdan sddm-greeter[581]: Message received from daemon: LoginSucceeded
Sep 23 08:51:49 cirdan sddm-helper[565]: [PAM] Ended.
Sep 23 08:51:49 cirdan sddm[520]: Auth: sddm-helper exited successfully
Sep 23 08:51:49 cirdan sddm[520]: Greeter stopped.
Sep 23 08:51:49 cirdan systemd-logind[518]: Removed session c1.
Sep 23 08:51:49 cirdan systemd[1]: Stopping User Manager for UID 997...
Sep 23 08:51:49 cirdan systemd[569]: Stopped target Default.
Sep 23 08:51:49 cirdan systemd[569]: Stopping D-Bus User Message Bus...
Sep 23 08:51:49 cirdan systemd[569]: Stopped D-Bus User Message Bus.
Sep 23 08:51:49 cirdan systemd[569]: Stopped target Basic System.
Sep 23 08:51:49 cirdan systemd[569]: Stopped target Sockets.
Sep 23 08:51:49 cirdan systemd[569]: Stopped target Timers.
Sep 23 08:51:49 cirdan systemd[569]: Stopped target Paths.
Sep 23 08:51:49 cirdan systemd[569]: Closed D-Bus User Message Bus Socket.
Sep 23 08:51:49 cirdan systemd[569]: Reached target Shutdown.
Sep 23 08:51:49 cirdan systemd[569]: Starting Exit the Session...
Sep 23 08:51:49 cirdan systemd[569]: Received SIGRTMIN+24 from PID 686 (kill).
Sep 23 08:51:49 cirdan systemd[574]: (pam_mount.c:538): *** PAM_MOUNT WAS INVOKED WITH INSUFFICIENT PRIVILEGES. (euid=997)
Sep 23 08:51:49 cirdan systemd[1]: Stopped User Manager for UID 997.
Sep 23 08:51:49 cirdan systemd[574]: (pam_mount.c:539): *** THIS IS A BUG OF THE CALLER. CONSULT YOUR DISTRO.
Sep 23 08:51:49 cirdan systemd[574]: (pam_mount.c:540): *** Also see bugs.txt in the pam_mount source tarball/website documentation.
Sep 23 08:51:49 cirdan systemd[1]: Removed slice user-997.slice.
Sep 23 08:51:49 cirdan systemd[569]: (pam_mount.c:538): *** PAM_MOUNT WAS INVOKED WITH INSUFFICIENT PRIVILEGES. (euid=997)
Sep 23 08:51:49 cirdan systemd[569]: (pam_mount.c:539): *** THIS IS A BUG OF THE CALLER. CONSULT YOUR DISTRO.
Sep 23 08:51:49 cirdan systemd[569]: (pam_mount.c:540): *** Also see bugs.txt in the pam_mount source tarball/website documentation.

Last edited by twelveeighty (2015-10-22 16:26:40)

Offline

#2 2015-09-23 16:51:25

sdoubleyou
Member
Registered: 2015-09-09
Posts: 5

Re: pam_mount fails to auto mount encrypted drive on startup

Unfortunately DBUS 1.10.0-3 makes currently much trouble. I also had trouble with pam and gnome-keyring. Only a downgrade of dbus and libdbus helped

Offline

#3 2015-09-23 16:58:27

twelveeighty
Member
From: Alberta, Canada
Registered: 2011-09-04
Posts: 1,096

Re: pam_mount fails to auto mount encrypted drive on startup

I edited my original post - this is actually fixed with the change to /etc/pam.d/login, I did not have to downgrade. I'm looking for clarification on whether that fix was done right, since it predated the current changes to dbus/systemd.

Offline

#4 2015-10-22 16:28:17

twelveeighty
Member
From: Alberta, Canada
Registered: 2011-09-04
Posts: 1,096

Re: pam_mount fails to auto mount encrypted drive on startup

As a test, I backed out the changes listed in the OP to see if those were still required and SDDM seems to start fine and also my encrypted volumes are decrypted no problem. If someone has some thoughts to share on what the original problem was, I'd be very interested. My /etc/pam.d/login is back to "vanilla" now.

Offline

Board footer

Powered by FluxBB