pam_slurm_adopt doesn't create a user systemd session #205

Open
opened 2025-10-22 15:11:54 +02:00 by rarias · 2 comments
Owner
% systemctl --user enable --now auto-fix-vscode-server.service
Failed to connect to user scope bus via local transport: $DBUS_SESSION_BUS_ADDRESS and $XDG_RUNTIME_DIR not defined (consider using --machine=<user>@.host --user to connect to bus of other user)

There is no login session for varcila:

fox% loginctl
SESSION  UID USER   SEAT LEADER CLASS   TTY IDLE SINCE
      1 1880 rarias -    4718   manager -   no   -

1 sessions listed.

Which doesn't start the dbus for the user:

fox% ls /run/user
1880

This is likely caused by disabling the systemd user session in pam to use pam adopt:

security.pam.services.sshd.startSession = lib.mkForce false;

Similar problem reported by Felip: https://support.schedmd.com/show_bug.cgi?id=3912

``` % systemctl --user enable --now auto-fix-vscode-server.service Failed to connect to user scope bus via local transport: $DBUS_SESSION_BUS_ADDRESS and $XDG_RUNTIME_DIR not defined (consider using --machine=<user>@.host --user to connect to bus of other user) ``` There is no login session for varcila: ``` fox% loginctl SESSION UID USER SEAT LEADER CLASS TTY IDLE SINCE 1 1880 rarias - 4718 manager - no - 1 sessions listed. ``` Which doesn't start the dbus for the user: ``` fox% ls /run/user 1880 ``` This is likely caused by disabling the systemd user session in pam to use pam adopt: https://jungle.bsc.es/git/rarias/jungle/src/commit/4261d327c678e52abdd568a27168ea7cdd0484a0/m/fox/configuration.nix#L111 Similar problem reported by Felip: https://support.schedmd.com/show_bug.cgi?id=3912
Author
Owner

For now, starting the session manually seems to work: systemctl start user@5650

For now, starting the session manually seems to work: `systemctl start user@5650`
rarias added the
bug
slurm
labels 2025-10-22 15:45:49 +02:00
Author
Owner

More info here https://slurm.schedmd.com/pam_slurm_adopt.html#PAM_CONFIG:

If you need the user management features from pam_systemd, such as handling user runtime directory /run/user/$UID, you can have the prolog script run 'loginctl enable-linger $SLURM_JOB_USER' and the epilog script disable it again (after making sure there are no other jobs from this user on the node) by running 'loginctl disable-linger $SLURM_JOB_USER'. You will also need to export the XDG_* environment variables if your software requires them.

More info here https://slurm.schedmd.com/pam_slurm_adopt.html#PAM_CONFIG: > If you need the user management features from pam_systemd, such as handling user runtime directory /run/user/$UID, you can have the prolog script run 'loginctl enable-linger $SLURM_JOB_USER' and the epilog script disable it again (after making sure there are no other jobs from this user on the node) by running 'loginctl disable-linger $SLURM_JOB_USER'. You will also need to export the XDG_* environment variables if your software requires them.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: rarias/jungle#205
No description provided.