Files
systemd/man
Lennart Poettering e652ec1099 pam_systemd: add option for acquiring logind inhibitor locks for the duration of a session (#42275)
This adds support in pam_systemd for acquiring an inhibitor lock when a
pam session is active, and can be used (for example) to prevent
suspend/sleep of a host when an ssh session is active on the host. The
reason string can be customized via `inhibit-why=`.

For example, /etc/pam.d/sshd can now contain this line: `-session
optional pam_systemd.so inhibit=sleep`

And sleep will be blocked when someone is logged into the system over
ssh:

```
foo:~$ systemd-inhibit --list --no-pager
WHO            UID USER PID COMM            WHAT  WHY                 MODE
NetworkManager 0   root 397 NetworkManager  sleep NetworkManager nee… delay
Realtime Kit   0   root 401 rtkit-daemon    sleep Demote realtime sc… delay
sshd           0   root 667 sshd-session.pa sleep Active PAM session  block
```

Fixes: #20654
2026-06-20 23:35:06 +02:00
..
2026-05-01 07:10:31 +02:00
2025-09-18 10:57:38 +01:00
2025-08-10 13:40:32 +02:00
2025-08-11 10:30:26 +02:00
2025-10-04 18:13:27 +02:00
2026-05-18 21:42:56 +02:00
2025-08-11 10:30:26 +02:00
2025-08-11 10:30:26 +02:00
2026-04-17 21:12:16 +01:00
2026-05-12 18:31:26 +02:00
2026-05-15 13:46:08 +01:00
2025-08-10 13:40:32 +02:00
2026-01-06 08:48:05 +09:00
2026-02-20 01:18:54 +09:00
2026-03-18 14:58:43 +01:00
2025-07-16 05:47:38 +09:00
2026-06-01 12:21:12 +02:00
…
2025-09-18 10:57:38 +01:00
…