5754 prtconf: assertion failure in libpcidb if vendor cannot be looked up
[illumos-gate.git] / usr / src / man / man5 / pam_list.5
blob202031466e9a468aa8c22d614b3f37b49bda861d
1 '\" te
2 .\" Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved.
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
4 .\"  See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with
5 .\" the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH PAM_LIST 5 "Mar 26, 2009"
7 .SH NAME
8 pam_list \- PAM account management module for UNIX
9 .SH SYNOPSIS
10 .LP
11 .nf
12  pam_list.so.1
13 .fi
15 .SH DESCRIPTION
16 .sp
17 .LP
18 The \fBpam_list\fR module implements \fBpam_sm_acct_mgmt\fR(3PAM), which
19 provides  functionality to the PAM account management stack.  The module
20 provides functions to validate  that  the  user's account  is  valid on this
21 host based on a list of users and/or netgroups in the given file. The users and
22 netgroups are separated by newline character. Netgroups are specified with
23 character '@' as prefix before name of netgroup in the list. The maximum line
24 lenght is 1023 characters.
25 .sp
26 .LP
27 The username is the value of \fBPAM_USER\fR. The host is the value of
28 \fBPAM_RHOST\fR or, if \fBPAM_RHOST\fR is not set, the value of the localhost
29 as returned by \fBgethostname\fR(3C) is used.
30 .sp
31 .LP
32 If neither of the \fBallow\fR, \fBdeny\fR, or \fBcompat\fR options are
33 specified, the module will look for +/- entries in the local \fB/etc/passwd\fR
34 file.  If this style is used, \fBnsswitch.conf\fR(4) must not be configured
35 with \fBcompat\fR for the \fBpasswd\fR database. If no relevant +/- entry
36 exists for the user, \fBpam_list\fR is not participating in result.
37 .sp
38 .LP
39 If \fBcompat\fR option is specified then the module will look for +/- entries
40 in the local \fB/etc/passwd\fR file. Other entries in this file will be counted
41 as + entries. If no relevant entry exits for the user, \fBpam_list\fR will deny
42 the access.
43 .sp
44 .LP
45 The following options can be passed to the module:
46 .sp
47 .ne 2
48 .na
49 \fB\fBallow=\fR\fR
50 .ad
51 .RS 19n
52 The full pathname to a file of allowed users and/or netgroups. Only one of
53 \fBallow=\fR or \fBdeny=\fR can be specified.
54 .RE
56 .sp
57 .ne 2
58 .na
59 \fB\fBcompat\fR\fR
60 .ad
61 .RS 19n
62 Activate \fBcompat\fR mode.
63 .RE
65 .sp
66 .ne 2
67 .na
68 \fB\fBdeny=\fR\fR
69 .ad
70 .RS 19n
71 The full pathname to a file of denied users and/or netgroups. Only one of
72 \fBdeny=\fR or \fBallow=\fR can be specified.
73 .RE
75 .sp
76 .ne 2
77 .na
78 \fB\fBdebug\fR\fR
79 .ad
80 .RS 19n
81 Provide \fBsyslog\fR(3C) debugging information at the \fBLOG_AUTH\fR |
82 \fBLOG_DEBUG\fR level.
83 .RE
85 .sp
86 .ne 2
87 .na
88 \fB\fBuser\fR\fR
89 .ad
90 .RS 19n
91 The module should only perform netgroup matches on the username. This is the
92 default option.
93 .RE
95 .sp
96 .ne 2
97 .na
98 \fB\fBnouser\fR\fR
99 .ad
100 .RS 19n
101 The username should not be used in the netgroup match.
105 .ne 2
107 \fB\fBhost\fR\fR
109 .RS 19n
110 Only the host should be used in netgroup matches.
114 .ne 2
116 \fB\fBnohost\fR\fR
118 .RS 19n
119 The hostname should not be used in netgroup matches.
123 .ne 2
125 \fB\fBuser_host_exact\fR\fR
127 .RS 19n
128 The user and hostname must be in the same netgroup.
131 .SH ERRORS
134 The following error values are returned:
136 .ne 2
138 \fB\fBPAM_SERVICE_ERR\fR\fR
140 .RS 20n
141 An invalid set of module options was given in the \fBpam.conf\fR(4) for this
142 module, or the \fBuser/netgroup\fR file could not be opened.
146 .ne 2
148 \fB\fBPAM_BUF_ERR\fR\fR
150 .RS 20n
151 A memory buffer error occurred.
155 .ne 2
157 \fB\fBPAM_IGNORE\fR\fR
159 .RS 20n
160 The module is ignored, as it is not participating in the result.
164 .ne 2
166 \fB\fBPAM_PERM_DENIED\fR\fR
168 .RS 20n
169 The user is not on the allow list or is on the deny list.
173 .ne 2
175 \fB\fBPAM_SUCCESS\fR\fR
177 .RS 20n
178 The account is valid for use at this time.
182 .ne 2
184 \fB\fBPAM_USER_UNKNOWN\fR\fR
186 .RS 20n
187 No account is present for the user
190 .SH EXAMPLES
192 \fBExample 1 \fRUsing \fBpam_list\fR in default mode
195 \fB/etc/pam.conf\fR modification looks like:
198 .in +2
200 other   account requisite       pam_roles.so.1
201 other   account required        pam_unix_account.so.1
202 other   account required        pam_list.so.1
204 .in -2
208 In the case of \fBdefault\fR mode or \fBcompat\fR mode, the important lines in
209 \fB/etc/passwd\fR appear as follows:
212 .in +2
214 +loginname      - user is approved
215 -loginname      - user is disapproved
216 +@netgroup      - netgroup members are approved
217 -@netgroup      - netgroup members are disapproved
219 .in -2
222 \fBExample 2 \fRUsing \fBpam_list\fR with allow file
225 \fB/etc/pam.conf\fR modification looks like:
228 .in +2
230 other   account requisite       pam_roles.so.1
231 other   account required        pam_unix_account.so.1
232 other   account required        pam_list.so.1 allow=etc/user.allow
234 .in -2
238 \fB/etc/users.allow\fR contains:
240 .in +2
242 root
243 localloginname
244 remoteloginname
245 @netgroup
247 .in -2
249 .SH ATTRIBUTES
252 See \fBattributes\fR(5) for descriptions of the following attributes:
257 box;
258 c | c
259 l | l .
260 ATTRIBUTE TYPE  ATTRIBUTE VALUE
262 Interface Stability     Committed
264 MT-Level        MT-Safe with exceptions
269 The interfaces in \fBlibpam\fR(3LIB) are MT-Safe only if each thread within the
270 multithreaded application uses its own PAM handle.
271 .SH SEE ALSO
274 \fBpam\fR(3PAM), \fBpam_authenticate\fR(3PAM), \fBpam_sm_acct_mgmt\fR(3PAM),
275 \fBsyslog\fR(3C), \fBlibpam\fR(3LIB), \fBnsswitch.conf\fR(4),
276 \fBpam.conf\fR(4), \fBattributes\fR(5)