PAM_SYSTEMD_HOME - Online Linux Manual PageSection : 8
Updated :
Source : systemd 253
Note : pam_systemd_home
NAMEpam_systemd_home − Authenticate users and mount home directories via systemd−homed.service
SYNOPSISpam_systemd_home.so
DESCRIPTIONpam_systemd_home ensures that home directories managed by systemd-homed.service(8) are automatically activated (mounted) on user login, and are deactivated (unmounted) when the last session of the user ends. For such users, it also provides authentication (when per−user disk encryption is used, the disk encryption key is derived from the authentication credential supplied at login time), account management (the JSON user record[1] embedded in the home store contains account details), and implements the updating of the encryption password (which is also used for user authentication).
OPTIONSThe following options are understood: suspend= Takes a boolean argument. If true, the home directory of the user will be suspended automatically during system suspend; if false it will remain active. Automatic suspending of the home directory improves security substantially as secret key material is automatically removed from memory before the system is put to sleep and must be re−acquired (through user re−authentication) when coming back from suspend. It is recommended to set this parameter for all PAM applications that have support for automatically re−authenticating via PAM on system resume. If multiple sessions of the same user are open in parallel the user's home directory will be left unsuspended on system suspend as long as at least one of the sessions does not set this parameter to on. Defaults to off. Note that TTY logins generally do not support re−authentication on system resume. Re−authentication on system resume is primarily a concept implementable in graphical environments, in the form of lock screens brought up automatically when the system goes to sleep. This means that if a user concurrently uses graphical login sessions that implement the required re−authentication mechanism and console logins that do not, the home directory is not locked during suspend, due to the logic explained above. That said, it is possible to set this field for TTY logins too, ignoring the fact that TTY logins actually don't support the re−authentication mechanism. In that case the TTY sessions will appear hung until the user logs in on another virtual terminal (regardless if via another TTY session or graphically) which will resume the home directory and unblock the original TTY session. (Do note that lack of screen locking on TTY sessions means even though the TTY session appears hung, keypresses can still be queued into it, and the existing screen contents be read without re−authentication; this limitation is unrelated to the home directory management pam_systemd_home and systemd−homed.service implement.) Turning this option on by default is highly recommended for all sessions, but only if the service managing these sessions correctly implements the aforementioned re−authentication. Note that the re−authentication must take place from a component running outside of the user's context, so that it does not require access to the user's home directory for operation. Traditionally, most desktop environments do not implement screen locking this way, and need to be updated accordingly. This setting may also be controlled via the $SYSTEMD_HOME_SUSPEND environment variable (see below), which pam_systemd_home reads during initialization and sets for sessions. If both the environment variable is set and the module parameter specified the latter takes precedence. debug[=] Takes an optional boolean argument. If yes or without the argument, the module will log debugging information as it operates.
MODULE TYPES PROVIDEDThe module implements all four PAM operations: auth (to allow authentication using the encrypted data), account (because users with systemd−homed.service user accounts are described in a JSON user record[1] and may be configured in more detail than in the traditional Linux user database), session (because user sessions must be tracked in order to implement automatic release when the last session of the user is gone), password (to change the encryption password — also used for user authentication — through PAM).
ENVIRONMENTThe following environment variables are initialized by the module and available to the processes of the user's session: $SYSTEMD_HOME=1 Indicates that the user's home directory is managed by systemd−homed.service. $SYSTEMD_HOME_SUSPEND= Indicates whether the session has been registered with the suspend mechanism enabled or disabled (see above). The variable's value is either "0" or "1". Note that the module both reads the variable when initializing, and sets it for sessions.
EXAMPLEHere's an example PAM configuration fragment that permits users managed by systemd−homed.service to log in: #%PAM−1.0
auth sufficient pam_unix.so
−auth sufficient pam_systemd_home.so
auth required pam_deny.so
account required pam_nologin.so
−account sufficient pam_systemd_home.so
account sufficient pam_unix.so
account required pam_permit.so
−password sufficient pam_systemd_home.so
password sufficient pam_unix.so sha512 shadow try_first_pass use_authtok
password required pam_deny.so
−session optional pam_keyinit.so revoke
−session optional pam_loginuid.so
−session optional pam_systemd_home.so
−session optional pam_systemd.so
session required pam_unix.so
SEE ALSOsystemd(1), systemd-homed.service(8), homed.conf(5), homectl(1), pam_systemd(8), pam.conf(5), pam.d(5), pam(8)
NOTES 1. JSON user record https://systemd.io/USER_RECORD/ 0
Johanes Gumabo
Data Size : 15,072 byte
man-pam_systemd_home.8Build : 2024-12-05, 20:55 :
Visitor Screen : x
Visitor Counter ( page / site ) : 2 / 184,271
Visitor ID : :
Visitor IP : 3.22.68.228 :
Visitor Provider : AMAZON-02 :
Provider Position ( lat x lon ) : 39.962500 x -83.006100 : x
Provider Accuracy Radius ( km ) : 1000 :
Provider City : Columbus :
Provider Province : Ohio , : ,
Provider Country : United States :
Provider Continent : North America :
Visitor Recorder : Version :
Visitor Recorder : Library :
Online Linux Manual Page : Version : Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.05
Online Linux Manual Page : Library : lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page : Library : lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base : Version : Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base : Library : lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36
Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.