pam_systemd.xml revision 9f7dad774ebfad23269800b7096eaad087481deb
3cc765d2718ac9b4ff978044ceabf5ad59d73edfZbigniew Jędrzejewski-Szmek<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
3cc765d2718ac9b4ff978044ceabf5ad59d73edfZbigniew Jędrzejewski-Szmek "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
3cc765d2718ac9b4ff978044ceabf5ad59d73edfZbigniew Jędrzejewski-Szmek This file is part of systemd.
3cc765d2718ac9b4ff978044ceabf5ad59d73edfZbigniew Jędrzejewski-Szmek Copyright 2010 Lennart Poettering
3cc765d2718ac9b4ff978044ceabf5ad59d73edfZbigniew Jędrzejewski-Szmek systemd is free software; you can redistribute it and/or modify it
3cc765d2718ac9b4ff978044ceabf5ad59d73edfZbigniew Jędrzejewski-Szmek under the terms of the GNU General Public License as published by
3cc765d2718ac9b4ff978044ceabf5ad59d73edfZbigniew Jędrzejewski-Szmek the Free Software Foundation; either version 2 of the License, or
3cc765d2718ac9b4ff978044ceabf5ad59d73edfZbigniew Jędrzejewski-Szmek (at your option) any later version.
3cc765d2718ac9b4ff978044ceabf5ad59d73edfZbigniew Jędrzejewski-Szmek systemd is distributed in the hope that it will be useful, but
3cc765d2718ac9b4ff978044ceabf5ad59d73edfZbigniew Jędrzejewski-Szmek WITHOUT ANY WARRANTY; without even the implied warranty of
3cc765d2718ac9b4ff978044ceabf5ad59d73edfZbigniew Jędrzejewski-Szmek MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3cc765d2718ac9b4ff978044ceabf5ad59d73edfZbigniew Jędrzejewski-Szmek General Public License for more details.
3cc765d2718ac9b4ff978044ceabf5ad59d73edfZbigniew Jędrzejewski-Szmek You should have received a copy of the GNU General Public License
3cc765d2718ac9b4ff978044ceabf5ad59d73edfZbigniew Jędrzejewski-Szmek along with systemd; If not, see <http://www.gnu.org/licenses/>.
3cc765d2718ac9b4ff978044ceabf5ad59d73edfZbigniew Jędrzejewski-Szmek <productname>systemd</productname>
3cc765d2718ac9b4ff978044ceabf5ad59d73edfZbigniew Jędrzejewski-Szmek <email>lennart@poettering.net</email>
3cc765d2718ac9b4ff978044ceabf5ad59d73edfZbigniew Jędrzejewski-Szmek <refentrytitle>pam_systemd</refentrytitle>
301af7e4853ad0281402f8d86f5a77c6cb7ce9f4Josh Triplett <refpurpose>Register user sessions in the systemd control group hierarchy</refpurpose>
301af7e4853ad0281402f8d86f5a77c6cb7ce9f4Josh Triplett </refnamediv>
3cc765d2718ac9b4ff978044ceabf5ad59d73edfZbigniew Jędrzejewski-Szmek <refsynopsisdiv>
3cc765d2718ac9b4ff978044ceabf5ad59d73edfZbigniew Jędrzejewski-Szmek <command>pam_systemd.so</command>
301af7e4853ad0281402f8d86f5a77c6cb7ce9f4Josh Triplett </cmdsynopsis>
301af7e4853ad0281402f8d86f5a77c6cb7ce9f4Josh Triplett </refsynopsisdiv>
3cc765d2718ac9b4ff978044ceabf5ad59d73edfZbigniew Jędrzejewski-Szmek <para><command>pam_systemd</command> registers user
3cc765d2718ac9b4ff978044ceabf5ad59d73edfZbigniew Jędrzejewski-Szmek sessions in the systemd control group
18ead1b00dff180a97507d014325cb46198e6657Chris Mayo hierarchy.</para>
3cc765d2718ac9b4ff978044ceabf5ad59d73edfZbigniew Jędrzejewski-Szmek <para>On login, this module ensures the following:</para>
e93549ef29c4123d9ee45acb5815048390201e49Zbigniew Jędrzejewski-Szmek <listitem><para>If it does not exist yet, the
301af7e4853ad0281402f8d86f5a77c6cb7ce9f4Josh Triplett user runtime directory
3cc765d2718ac9b4ff978044ceabf5ad59d73edfZbigniew Jędrzejewski-Szmek <filename>/run/user/$USER</filename> is
3cc765d2718ac9b4ff978044ceabf5ad59d73edfZbigniew Jędrzejewski-Szmek created and its ownership changed to the user
3cc765d2718ac9b4ff978044ceabf5ad59d73edfZbigniew Jędrzejewski-Szmek that is logging in.</para></listitem>
3cc765d2718ac9b4ff978044ceabf5ad59d73edfZbigniew Jędrzejewski-Szmek <option>create-session=1</option> is set, the
3cc765d2718ac9b4ff978044ceabf5ad59d73edfZbigniew Jędrzejewski-Szmek <varname>$XDG_SESSION_ID</varname> environment
3cc765d2718ac9b4ff978044ceabf5ad59d73edfZbigniew Jędrzejewski-Szmek variable is initialized. If auditing is
3cc765d2718ac9b4ff978044ceabf5ad59d73edfZbigniew Jędrzejewski-Szmek <command>pam_loginuid.so</command> run before
3cc765d2718ac9b4ff978044ceabf5ad59d73edfZbigniew Jędrzejewski-Szmek this module (which is highly recommended), the
3cc765d2718ac9b4ff978044ceabf5ad59d73edfZbigniew Jędrzejewski-Szmek variable is initialized from the auditing
3cc765d2718ac9b4ff978044ceabf5ad59d73edfZbigniew Jędrzejewski-Szmek (<filename>/proc/self/sessionid</filename>). Otherwise
8d0e0ddda6501479eb69164687c83c1a7667b33aJan Engelhardt an independent session counter is
3cc765d2718ac9b4ff978044ceabf5ad59d73edfZbigniew Jędrzejewski-Szmek <option>create-session=1</option> is set, a new
3cc765d2718ac9b4ff978044ceabf5ad59d73edfZbigniew Jędrzejewski-Szmek <filename>/user/$USER/$XDG_SESSION_ID</filename>
3cc765d2718ac9b4ff978044ceabf5ad59d73edfZbigniew Jędrzejewski-Szmek is created and the login process moved into
3cc765d2718ac9b4ff978044ceabf5ad59d73edfZbigniew Jędrzejewski-Szmek <option>create-session=0</option> is set, a new
3cc765d2718ac9b4ff978044ceabf5ad59d73edfZbigniew Jędrzejewski-Szmek <filename>/user/$USER/user</filename>
3cc765d2718ac9b4ff978044ceabf5ad59d73edfZbigniew Jędrzejewski-Szmek is created and the login process moved into
8c9571d0ae50656f730a5e37378d5c3dcf3b9789Lennart Poettering <para>On logout, this module ensures the following:</para>
3cc765d2718ac9b4ff978044ceabf5ad59d73edfZbigniew Jędrzejewski-Szmek <varname>$XDG_SESSION_ID</varname> is set and
3cc765d2718ac9b4ff978044ceabf5ad59d73edfZbigniew Jędrzejewski-Szmek <option>kill-session=1</option> specified, all
3cc765d2718ac9b4ff978044ceabf5ad59d73edfZbigniew Jędrzejewski-Szmek remaining processes in the
3cc765d2718ac9b4ff978044ceabf5ad59d73edfZbigniew Jędrzejewski-Szmek <filename>/user/$USER/$XDG_SESSION_ID</filename>
3cc765d2718ac9b4ff978044ceabf5ad59d73edfZbigniew Jędrzejewski-Szmek control group are killed and the control group
3cc765d2718ac9b4ff978044ceabf5ad59d73edfZbigniew Jędrzejewski-Szmek <varname>$XDG_SESSION_ID</varname> is set and
3cc765d2718ac9b4ff978044ceabf5ad59d73edfZbigniew Jędrzejewski-Szmek <option>kill-session=0</option> specified, all
3cc765d2718ac9b4ff978044ceabf5ad59d73edfZbigniew Jędrzejewski-Szmek remaining processes in the
3cc765d2718ac9b4ff978044ceabf5ad59d73edfZbigniew Jędrzejewski-Szmek <filename>/user/$USER/$XDG_SESSION_ID</filename>
3cc765d2718ac9b4ff978044ceabf5ad59d73edfZbigniew Jędrzejewski-Szmek control group are migrated to
3cc765d2718ac9b4ff978044ceabf5ad59d73edfZbigniew Jędrzejewski-Szmek <filename>/user/$USER/user</filename> and
3cc765d2718ac9b4ff978044ceabf5ad59d73edfZbigniew Jędrzejewski-Szmek the original control group is
0dc5d23c85db85f96b141d4d32deee8018e56a6aLennart Poettering <option>kill-user=1</option> is specified, and
0dc5d23c85db85f96b141d4d32deee8018e56a6aLennart Poettering no other user session control group remains,
0dc5d23c85db85f96b141d4d32deee8018e56a6aLennart Poettering all remaining processes in the
0dc5d23c85db85f96b141d4d32deee8018e56a6aLennart Poettering <filename>/user/$USER</filename> hierarchy
0dc5d23c85db85f96b141d4d32deee8018e56a6aLennart Poettering are killed and the control group is removed.</para></listitem>
0dc5d23c85db85f96b141d4d32deee8018e56a6aLennart Poettering <option>kill-user=0</option> is specified, and
0dc5d23c85db85f96b141d4d32deee8018e56a6aLennart Poettering no process remains in the
0dc5d23c85db85f96b141d4d32deee8018e56a6aLennart Poettering <filename>/user/$USER</filename> hierarchy the
0dc5d23c85db85f96b141d4d32deee8018e56a6aLennart Poettering control group is removed.</para></listitem>
0dc5d23c85db85f96b141d4d32deee8018e56a6aLennart Poettering <filename>/user/$USER</filename> control group
3cc765d2718ac9b4ff978044ceabf5ad59d73edfZbigniew Jędrzejewski-Szmek <varname>$XDG_RUNTIME_DIR</varname> directory
3cc765d2718ac9b4ff978044ceabf5ad59d73edfZbigniew Jędrzejewski-Szmek and all its contents are
3cc765d2718ac9b4ff978044ceabf5ad59d73edfZbigniew Jędrzejewski-Szmek <para>If the system was not booted up with systemd as
3cc765d2718ac9b4ff978044ceabf5ad59d73edfZbigniew Jędrzejewski-Szmek init system, this module does nothing and immediately
0dc5d23c85db85f96b141d4d32deee8018e56a6aLennart Poettering returns PAM_SUCCESS.</para>
auth required pam_unix.so
auth required pam_nologin.so
account required pam_unix.so
password required pam_unix.so
session required pam_unix.so
session required pam_loginuid.so