HALF ECHO LEARN / REFERENCE COLLECTION

v262.2

src/login/systemd-user.in

1,240 bytesGit mode 100644Download original fileLGPL-2.1-or-later

Git blob: 6a4bc058e6ffd8c5cf93851b43ffd431df62323c

Lines 1–30 of 30

# SPDX-License-Identifier: LGPL-2.1-or-later
# This file is part of systemd.
#
# Used by systemd --user instances.
 
{% if ENABLE_HOMED %}
-account [success=done authtok_expired=bad new_authtok_reqd=bad maxtries=bad acct_expired=bad default=ignore] pam_systemd_home.so
{% endif %}
account  required   pam_unix.so no_pass_expiry
 
# systemd never invokes pam_authenticate() on this stack, but it does invoke pam_setcred(), which runs the
# "auth" stack too. Hence an "auth" entry is needed that lets pam_setcred() succeed, without falling back to
# the "other" service (which typically consists of pam_warn/pam_deny, and thus generates log noise).
# pam_rootok's pam_sm_setcred() unconditionally succeeds, while its pam_sm_authenticate() only succeeds for
# callers running as root (which the service manager does).
auth     required   pam_rootok.so
 
{% if HAVE_SELINUX %}
session  required   pam_selinux.so close
session  required   pam_selinux.so nottys open
{% endif %}
session  required   pam_loginuid.so
session  optional   pam_keyinit.so force revoke
session  required   pam_namespace.so
{% if ENABLE_HOMED %}
-session optional   pam_systemd_home.so
{% endif %}
session  optional   pam_umask.so silent
session  optional   pam_systemd.so