pam_systemd_home - Man Page

Automatically mount home directories managed by systemd-homed.service on login, and unmount them on logout



pam_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.


The following options are understood:


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. Defaults to off.


Takes an optional boolean argument. If yes or without the argument, the module will log debugging information as it operates.

Module Types Provided

The module provides all four management operations: auth, account, session, password.


The following environment variables are initialized by the module and available to the processes of the user's session:


Indicates that the user's home directory is managed by systemd-homed.service.


Here's an example PAM configuration fragment that permits users managed by systemd-homed.service to log in:

auth      sufficient
-auth     sufficient
auth      required

account   required
-account  sufficient
account   sufficient
account   required

-password sufficient
password  sufficient sha512 shadow try_first_pass try_authtok
password  required

-session  optional revoke
-session  optional
-session  optional
-session  optional
session   required

See Also

systemd(1), systemd-homed.service(8), homed.conf(5), homectl(1), pam_systemd(8), pam.conf(5), pam.d(5), pam(8)

Referenced By

pam_systemd(8), systemd.directives(7), systemd.index(7).

systemd 245