| 1 |
'\" t |
| 2 |
.\" Title: pam_usertype |
| 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_USERTYPE" "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_usertype \- check if the authenticated user is a system or regular account |
| 32 |
.SH "SYNOPSIS" |
| 33 |
.HP \w'\fBpam_usertype\&.so\fR\ 'u |
| 34 |
\fBpam_usertype\&.so\fR [\fIflag\fR...] {\fIcondition\fR} |
| 35 |
.SH "DESCRIPTION" |
| 36 |
.PP |
| 37 |
pam_usertype\&.so is designed to succeed or fail authentication based on type of the account of the authenticated user\&. The type of the account is decided with help of |
| 38 |
\fISYS_UID_MAX\fR |
| 39 |
settings in |
| 40 |
\fI/etc/login\&.defs\fR\&. One use is to select whether to load other modules based on this test\&. |
| 41 |
.PP |
| 42 |
The module should be given only one condition as module argument\&. Authentication will succeed only if the condition is met\&. |
| 43 |
.SH "OPTIONS" |
| 44 |
.PP |
| 45 |
The following |
| 46 |
\fIflag\fRs are supported: |
| 47 |
.PP |
| 48 |
use_uid |
| 49 |
.RS 4 |
| 50 |
Evaluate conditions using the account of the user whose UID the application is running under instead of the user being authenticated\&. |
| 51 |
.RE |
| 52 |
.PP |
| 53 |
audit |
| 54 |
.RS 4 |
| 55 |
Log unknown users to the system log\&. |
| 56 |
.RE |
| 57 |
.PP |
| 58 |
Available |
| 59 |
\fIcondition\fRs are: |
| 60 |
.PP |
| 61 |
issystem |
| 62 |
.RS 4 |
| 63 |
Succeed if the user is a system user\&. |
| 64 |
.RE |
| 65 |
.PP |
| 66 |
isregular |
| 67 |
.RS 4 |
| 68 |
Succeed if the user is a regular user\&. |
| 69 |
.RE |
| 70 |
.SH "MODULE TYPES PROVIDED" |
| 71 |
.PP |
| 72 |
All module types (\fBaccount\fR, |
| 73 |
\fBauth\fR, |
| 74 |
\fBpassword\fR |
| 75 |
and |
| 76 |
\fBsession\fR) are provided\&. |
| 77 |
.SH "RETURN VALUES" |
| 78 |
.PP |
| 79 |
PAM_SUCCESS |
| 80 |
.RS 4 |
| 81 |
The condition was true\&. |
| 82 |
.RE |
| 83 |
.PP |
| 84 |
PAM_BUF_ERR |
| 85 |
.RS 4 |
| 86 |
Memory buffer error\&. |
| 87 |
.RE |
| 88 |
.PP |
| 89 |
PAM_CONV_ERR |
| 90 |
.RS 4 |
| 91 |
The conversation method supplied by the application failed to obtain the username\&. |
| 92 |
.RE |
| 93 |
.PP |
| 94 |
PAM_INCOMPLETE |
| 95 |
.RS 4 |
| 96 |
The conversation method supplied by the application returned PAM_CONV_AGAIN\&. |
| 97 |
.RE |
| 98 |
.PP |
| 99 |
PAM_AUTH_ERR |
| 100 |
.RS 4 |
| 101 |
The condition was false\&. |
| 102 |
.RE |
| 103 |
.PP |
| 104 |
PAM_SERVICE_ERR |
| 105 |
.RS 4 |
| 106 |
A service error occurred or the arguments can\*(Aqt be parsed correctly\&. |
| 107 |
.RE |
| 108 |
.PP |
| 109 |
PAM_USER_UNKNOWN |
| 110 |
.RS 4 |
| 111 |
User was not found\&. |
| 112 |
.RE |
| 113 |
.SH "EXAMPLES" |
| 114 |
.PP |
| 115 |
Skip remaining modules if the user is a system user: |
| 116 |
.sp |
| 117 |
.if n \{\ |
| 118 |
.RS 4 |
| 119 |
.\} |
| 120 |
.nf |
| 121 |
account sufficient pam_usertype\&.so issystem |
| 122 |
|
| 123 |
.fi |
| 124 |
.if n \{\ |
| 125 |
.RE |
| 126 |
.\} |
| 127 |
.SH "SEE ALSO" |
| 128 |
.PP |
| 129 |
\fBlogin.defs\fR(5), |
| 130 |
\fBpam\fR(8) |
| 131 |
.SH "AUTHOR" |
| 132 |
.PP |
| 133 |
Pavel Březina <pbrezina@redhat\&.com> |