| 1 |
'\" t |
| 2 |
.\" Title: pam_sepermit |
| 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_SEPERMIT" "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_sepermit \- PAM module to allow/deny login depending on SELinux enforcement state |
| 32 |
.SH "SYNOPSIS" |
| 33 |
.HP \w'\fBpam_sepermit\&.so\fR\ 'u |
| 34 |
\fBpam_sepermit\&.so\fR [debug] [conf=\fI/path/to/config/file\fR] |
| 35 |
.SH "DESCRIPTION" |
| 36 |
.PP |
| 37 |
The pam_sepermit module allows or denies login depending on SELinux enforcement state\&. |
| 38 |
.PP |
| 39 |
When the users which are logging in match an entry in the config file they are allowed access only when SELinux is in enforcing mode\&. Otherwise they are denied access\&. For users not matching any entry in the config file the pam_sepermit module returns PAM_IGNORE return value\&. |
| 40 |
.PP |
| 41 |
The config file contains a list of user names one per line with optional arguments\&. If the |
| 42 |
\fIname\fR |
| 43 |
is prefixed with |
| 44 |
\fI@\fR |
| 45 |
character it means that all users in the group |
| 46 |
\fIname\fR |
| 47 |
match\&. If it is prefixed with a |
| 48 |
\fI%\fR |
| 49 |
character the SELinux user is used to match against the |
| 50 |
\fIname\fR |
| 51 |
instead of the account name\&. Note that when SELinux is disabled the SELinux user assigned to the account cannot be determined\&. This means that such entries are never matched when SELinux is disabled and pam_sepermit will return PAM_IGNORE\&. |
| 52 |
.PP |
| 53 |
See |
| 54 |
\fBsepermit.conf\fR(5) |
| 55 |
for details\&. |
| 56 |
.SH "OPTIONS" |
| 57 |
.PP |
| 58 |
debug |
| 59 |
.RS 4 |
| 60 |
Turns on debugging via |
| 61 |
\fBsyslog\fR(3)\&. |
| 62 |
.RE |
| 63 |
.PP |
| 64 |
conf=/path/to/config/file |
| 65 |
.RS 4 |
| 66 |
Path to alternative config file overriding the default\&. |
| 67 |
.RE |
| 68 |
.SH "MODULE TYPES PROVIDED" |
| 69 |
.PP |
| 70 |
The |
| 71 |
\fBauth\fR |
| 72 |
and |
| 73 |
\fBaccount\fR |
| 74 |
module types are provided\&. |
| 75 |
.SH "RETURN VALUES" |
| 76 |
.PP |
| 77 |
PAM_AUTH_ERR |
| 78 |
.RS 4 |
| 79 |
SELinux is disabled or in the permissive mode and the user matches\&. |
| 80 |
.RE |
| 81 |
.PP |
| 82 |
PAM_SUCCESS |
| 83 |
.RS 4 |
| 84 |
SELinux is in the enforcing mode and the user matches\&. |
| 85 |
.RE |
| 86 |
.PP |
| 87 |
PAM_IGNORE |
| 88 |
.RS 4 |
| 89 |
The user does not match any entry in the config file\&. |
| 90 |
.RE |
| 91 |
.PP |
| 92 |
PAM_USER_UNKNOWN |
| 93 |
.RS 4 |
| 94 |
The module was unable to determine the user\*(Aqs name\&. |
| 95 |
.RE |
| 96 |
.PP |
| 97 |
PAM_SERVICE_ERR |
| 98 |
.RS 4 |
| 99 |
Error during reading or parsing the config file\&. |
| 100 |
.RE |
| 101 |
.SH "FILES" |
| 102 |
.PP |
| 103 |
/etc/security/sepermit\&.conf |
| 104 |
.RS 4 |
| 105 |
Default configuration file |
| 106 |
.RE |
| 107 |
.SH "EXAMPLES" |
| 108 |
.sp |
| 109 |
.if n \{\ |
| 110 |
.RS 4 |
| 111 |
.\} |
| 112 |
.nf |
| 113 |
auth [success=done ignore=ignore default=bad] pam_sepermit\&.so |
| 114 |
auth required pam_unix\&.so |
| 115 |
account required pam_unix\&.so |
| 116 |
session required pam_permit\&.so |
| 117 |
|
| 118 |
.fi |
| 119 |
.if n \{\ |
| 120 |
.RE |
| 121 |
.\} |
| 122 |
.SH "SEE ALSO" |
| 123 |
.PP |
| 124 |
\fBsepermit.conf\fR(5), |
| 125 |
\fBpam.conf\fR(5), |
| 126 |
\fBpam.d\fR(5), |
| 127 |
\fBpam\fR(7) |
| 128 |
\fBselinux\fR(8) |
| 129 |
.SH "AUTHOR" |
| 130 |
.PP |
| 131 |
pam_sepermit and this manual page were written by Tomas Mraz <tmraz@redhat\&.com>\&. |