Debian Codegraph @

upstream/debian-unstable/man8/pam_localuser.8

raw
1 '\" t
2 .\" Title: pam_localuser
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_LOCALUSER" "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_localuser \- require users to be listed in /etc/passwd
32 .SH "SYNOPSIS"
33 .HP \w'\fBpam_localuser\&.so\fR\ 'u
34 \fBpam_localuser\&.so\fR [debug] [file=\fI/path/passwd\fR]
35 .SH "DESCRIPTION"
36 .PP
37 pam_localuser is a PAM module to help implementing site\-wide login policies, where they typically include a subset of the network\*(Aqs users and a few accounts that are local to a particular workstation\&. Using pam_localuser and pam_wheel or pam_listfile is an effective way to restrict access to either local users and/or a subset of the network\*(Aqs users\&.
38 .PP
39 This could also be implemented using pam_listfile\&.so and a very short awk script invoked by cron, but it\*(Aqs common enough to have been separated out\&.
40 .SH "OPTIONS"
41 .PP
42 .PP
43 debug
44 .RS 4
45 Print debug information\&.
46 .RE
47 .PP
48 file=/path/passwd
49 .RS 4
50 Use a file other than
51 /etc/passwd\&.
52 .RE
53 .SH "MODULE TYPES PROVIDED"
54 .PP
55 All module types (\fBaccount\fR,
56 \fBauth\fR,
57 \fBpassword\fR
58 and
59 \fBsession\fR) are provided\&.
60 .SH "RETURN VALUES"
61 .PP
62 .PP
63 PAM_SUCCESS
64 .RS 4
65 The new localuser was set successfully\&.
66 .RE
67 .PP
68 PAM_BUF_ERR
69 .RS 4
70 Memory buffer error\&.
71 .RE
72 .PP
73 PAM_CONV_ERR
74 .RS 4
75 The conversation method supplied by the application failed to obtain the username\&.
76 .RE
77 .PP
78 PAM_INCOMPLETE
79 .RS 4
80 The conversation method supplied by the application returned PAM_CONV_AGAIN\&.
81 .RE
82 .PP
83 PAM_SERVICE_ERR
84 .RS 4
85 The user name is not valid or the passwd file is unavailable\&.
86 .RE
87 .PP
88 PAM_PERM_DENIED
89 .RS 4
90 The user is not listed in the passwd file\&.
91 .RE
92 .SH "EXAMPLES"
93 .PP
94 Add the following lines to
95 /etc/pam\&.d/su
96 to allow only local users or group wheel to use su\&.
97 .sp
98 .if n \{\
99 .RS 4
100 .\}
101 .nf
102 account sufficient pam_localuser\&.so
103 account required pam_wheel\&.so
104
105 .fi
106 .if n \{\
107 .RE
108 .\}
109 .sp
110 .SH "FILES"
111 .PP
112 /etc/passwd
113 .RS 4
114 Local user account information\&.
115 .RE
116 .SH "SEE ALSO"
117 .PP
118 \fBpam.conf\fR(5),
119 \fBpam.d\fR(5),
120 \fBpam\fR(7)
121 .SH "AUTHOR"
122 .PP
123 pam_localuser was written by Nalin Dahyabhai <nalin@redhat\&.com>\&.