Am 01.03.26 um 21:28 schrieb Nicolas George:
Paul Leiber (HE12026-03-01):
What I noticed in the pam-mount logs was a line saying that "user A seems to
have other remaining open sessions".
I would suggest to check:

- if the user still has processes running after they logged out;

There are no open processes of the user after logout. (The line <logout wait="2000" hup="0" term="1" kill="1"/> should have taken care of that anyway, if I am not mistaken.)
- the “session started” / “session ended” (stopped?) in the systemd
   logs.

There are log entries indicating start of session and temination of session for the user, but nothing that seems incorrect.

I still think that the problem lies with pmvarrun not being called to decrease the entry for a user at logout. I found a bug report [1] where pmvarrun is called twice at login, but only once at logout, resulting in too high values in /var/run/pam_mount/username. However, the root cause seems to be different than in my case, where the number is correct after login, but incorrect after logout.

Here is an excerpt of my journal:

Login:
Mär 02 10:22:40 computer login[13770]: pam_krb5(login:auth): user xxx authenticated as xxx@xxx Mär 02 10:22:40 computer login[13770]: pam_winbind(login:account): user 'xxx' granted access Mär 02 10:22:40 computer login[13770]: pam_unix(login:session): session opened for user xxx(uid=xxx) by xxx(uid=0) Mär 02 10:22:40 computer login[13770]: (pam_mount.c:568): pam_mount 2.20: entering session stage Mär 02 10:22:44 computer login[13770]: (mount.c:264): Mount info: globalconf, user=xxx <volume fstype="cifs" server="server" path="scans" mountpoint="/home/xxx/Scans" cipher="(null)" fskeypath="(null)" fskeycipher="(null)" fskeyhash="(null)" header="(n> Mär 02 10:22:44 computer login[13770]: (mount.c:636): scans already seems to be mounted at /home/xxx/Scans, skipping Mär 02 10:22:44 computer login[13770]: command: '/usr/sbin/pmvarrun' '-u' 'xxx' Mär 02 10:22:44 computer login[13770]: (pam_mount.c:441): pmvarrun says login count is 17 Mär 02 10:22:44 computer login[13770]: (pam_mount.c:660): done opening session (ret=0)


Logout:
Mär 02 10:22:44 computer login[14845]: (pam_mount.c:133): clean system authtok=0x557a08b07140 (1073741824) Mär 02 10:22:44 computer login[14845]: (pam_mount.c:116): Clean global config (1073741824) Mär 02 10:22:47 computer login[13770]: pam_unix(login:session): session closed for user xxx Mär 02 10:22:47 computer login[13770]: (pam_mount.c:706): received order to close things Mär 02 10:22:47 computer login[13770]: command: '/usr/sbin/pmvarrun' '-u' 'xxx' Mär 02 10:22:47 computer login[13770]: (pam_mount.c:441): pmvarrun says login count is 18 Mär 02 10:22:47 computer login[13770]: (pam_mount.c:734): xxx seems to have other remaining open sessions Mär 02 10:22:47 computer login[13770]: (pam_mount.c:743): pam_mount execution complete Mär 02 10:22:47 computer login[13770]: (pam_mount.c:133): clean system authtok=0x557a08b07140 (0) Mär 02 10:22:47 computer login[13770]: (pam_mount.c:116): Clean global config (0)

After some trials, the login count is already at 18. Also, the volumes are already had been mounted, hence pam_mount is skipping the mount.


[1] https://bugs.freedesktop.org/show_bug.cgi?__goaway_challenge=meta-refresh&__goaway_id=d92d5d6bfe867e15e4f47d4f0f2253b2&__goaway_referer=https%3A%2F%2Fwww.google.com%2F&id=70214

Reply via email to