| 1 |
'\" t |
| 2 |
.\" Title: pam_loginuid |
| 3 |
.\" Author: [see the "AUTHOR" section] |
| 4 |
.\" Generator: DocBook XSL Stylesheets v1.79.2 <http://docbook.sf.net/> |
| 5 |
.\" Date: 06/29/2025 |
| 6 |
.\" Manual: Linux-PAM Manual |
| 7 |
.\" Source: Linux-PAM |
| 8 |
.\" Language: English |
| 9 |
.\" |
| 10 |
.TH "PAM_LOGINUID" "8" "06/29/2025" "Linux\-PAM" "Linux\-PAM Manual" |
| 11 |
.\" ----------------------------------------------------------------- |
| 12 |
.\" * Define some portability stuff |
| 13 |
.\" ----------------------------------------------------------------- |
| 14 |
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 15 |
.\" http://bugs.debian.org/507673 |
| 16 |
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html |
| 17 |
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 18 |
.ie \n(.g .ds Aq \(aq |
| 19 |
.el .ds Aq ' |
| 20 |
.\" ----------------------------------------------------------------- |
| 21 |
.\" * set default formatting |
| 22 |
.\" ----------------------------------------------------------------- |
| 23 |
.\" disable hyphenation |
| 24 |
.nh |
| 25 |
.\" disable justification (adjust text to left margin only) |
| 26 |
.ad l |
| 27 |
.\" ----------------------------------------------------------------- |
| 28 |
.\" * MAIN CONTENT STARTS HERE * |
| 29 |
.\" ----------------------------------------------------------------- |
| 30 |
.SH "NAME" |
| 31 |
pam_loginuid \- Record user\*(Aqs login uid to the process attribute |
| 32 |
.SH "SYNOPSIS" |
| 33 |
.HP \w'\fBpam_loginuid\&.so\fR\ 'u |
| 34 |
\fBpam_loginuid\&.so\fR [require_auditd] |
| 35 |
.SH "DESCRIPTION" |
| 36 |
.PP |
| 37 |
The pam_loginuid module sets the loginuid process attribute for the process that was authenticated\&. This is necessary for applications to be correctly audited\&. This PAM module should only be used for entry point applications like: login, sshd, gdm, vsftpd, crond and atd\&. There are probably other entry point applications besides these\&. You should not use it for applications like sudo or su as that defeats the purpose by changing the loginuid to the account they just switched to\&. |
| 38 |
.SH "OPTIONS" |
| 39 |
.PP |
| 40 |
require_auditd |
| 41 |
.RS 4 |
| 42 |
This option, when given, will cause this module to query the audit daemon status and deny logins if it is not running\&. |
| 43 |
.RE |
| 44 |
.SH "MODULE TYPES PROVIDED" |
| 45 |
.PP |
| 46 |
Only the |
| 47 |
\fBsession\fR |
| 48 |
module type is provided\&. |
| 49 |
.SH "RETURN VALUES" |
| 50 |
.PP |
| 51 |
.PP |
| 52 |
PAM_SUCCESS |
| 53 |
.RS 4 |
| 54 |
The loginuid value is set and auditd is running if check requested\&. |
| 55 |
.RE |
| 56 |
.PP |
| 57 |
PAM_IGNORE |
| 58 |
.RS 4 |
| 59 |
The /proc/self/loginuid file is not present on the system or the login process runs inside uid namespace and kernel does not support overwriting loginuid\&. |
| 60 |
.RE |
| 61 |
.PP |
| 62 |
PAM_SESSION_ERR |
| 63 |
.RS 4 |
| 64 |
Any other error prevented setting loginuid or auditd is not running\&. |
| 65 |
.RE |
| 66 |
.SH "EXAMPLES" |
| 67 |
.sp |
| 68 |
.if n \{\ |
| 69 |
.RS 4 |
| 70 |
.\} |
| 71 |
.nf |
| 72 |
#%PAM\-1\&.0 |
| 73 |
auth required pam_unix\&.so |
| 74 |
auth required pam_nologin\&.so |
| 75 |
account required pam_unix\&.so |
| 76 |
password required pam_unix\&.so |
| 77 |
session required pam_unix\&.so |
| 78 |
session required pam_loginuid\&.so |
| 79 |
|
| 80 |
.fi |
| 81 |
.if n \{\ |
| 82 |
.RE |
| 83 |
.\} |
| 84 |
.SH "SEE ALSO" |
| 85 |
.PP |
| 86 |
\fBpam.conf\fR(5), |
| 87 |
\fBpam.d\fR(5), |
| 88 |
\fBpam\fR(7), |
| 89 |
\fBauditctl\fR(8), |
| 90 |
\fBauditd\fR(8) |
| 91 |
.SH "AUTHOR" |
| 92 |
.PP |
| 93 |
pam_loginuid was written by Steve Grubb <sgrubb@redhat\&.com> |