1 .\" $NetBSD: pam.conf.5,v 1.8 2005/03/17 12:55:26 wiz Exp $
3 .\" Copyright (c) 2005 The NetBSD Foundation, Inc.
4 .\" All rights reserved.
6 .\" This code is derived from software contributed to The NetBSD Foundation
7 .\" by Jason R. Thorpe.
9 .\" Redistribution and use in source and binary forms, with or without
10 .\" modification, are permitted provided that the following conditions
12 .\" 1. Redistributions of source code must retain the above copyright
13 .\" notice, this list of conditions and the following disclaimer.
14 .\" 2. Redistributions in binary form must reproduce the above copyright
15 .\" notice, this list of conditions and the following disclaimer in the
16 .\" documentation and/or other materials provided with the distribution.
18 .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
19 .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
20 .\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21 .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
22 .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23 .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24 .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25 .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26 .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28 .\" POSSIBILITY OF SUCH DAMAGE.
35 .Nd Pluggable Authentication Modules configuration file
39 file specifies how Pluggable Authentication Modules
42 For an overview of the Pluggable Authentication Modules framework, see
45 PAM may be configured using a single
47 configuration file or by using multiple configuration files, one for each
48 PAM-aware service, located in the
57 is the preferred method for configuring PAM.
59 PAM's configuration is based on
61 different modules together to form a processing chain for the task.
62 A standard PAM configuration stanza is structured as follows:
63 .Bd -filled -offset indent
76 It specifies the PAM-aware service whose PAM behavior is being configured.
79 is used, the name of the configuration file specifies the service.
82 specifies which of the four classes of PAM module functionality is being
84 These four classes are
86 .Pq account management ,
90 .Pq password management ,
93 .Pq session management .
96 specifies the behavior of the processing chain upon success or failure
97 of the PAM module's authentication task.
98 The following are valid values for
100 .Bl -tag -width sufficient
102 If the module succeeds and no earlier module in the chain
103 has failed, the chain is immediately terminated and the
105 If the module fails, the rest of the chain is executed,
106 but the request is ultimately denied.
108 If the module returns success, continue to execute the processing chain.
109 If the module fails, immediately return the error code from the first
113 If the module returns success, continue to execute the processing chain.
114 If the module fails, record as a
116 failure and continue to execute the processing chain.
119 failures in the processing chain, the chain will ultimately return
122 If the module returns success, continue to execute the processing chain.
123 If the module fails, record as an
125 failure and continue to execute the processing chain.
127 If the module returns success and there have been no recorded
129 failures, immediately return success without calling any subsequent
130 modules in the processing chain.
131 If the module fails, return as an
133 failure and continue to execute the processing chain.
137 specifies the module to execute for this stanza.
138 This is either an absolute path name or a path name relative to the
139 default module location:
140 .Pa /usr/lib/security .
143 are additional options that may be specified for the module.
144 Refer to the individual modules' documentation for more information
145 on available options.
147 In addition to the standard configuration stanza format, there is
148 an additional stanza format available when
151 .Bd -filled -offset indent
157 This stanza format provides a simple inheritance model for processing
160 .Bl -tag -width /etc/pam.conf -compact
162 monolithic PAM configuration file
164 PAM service configuration file directory
169 processing chain for the
176 performs the following tasks: allows the login if the old user
177 and new user are the same, verifies that logins are not disabled using
180 file, allows Kerberos 5 password authentication, and requires standard
182 password authentication if Kerberos 5 failed:
183 .Bd -literal -offset indent
184 auth sufficient pam_self.so
185 auth required pam_nologin.so
186 auth sufficient pam_krb5.so
187 auth required pam_unix.so
190 It is important to note that loading a chain will fail if any of the
191 components of the chain fail to load or are not available.
192 A common situation when this can happen is on a system that where
197 have not been installed.
203 might not be present in the system.
204 In order for a chain to load properly all non-present components must
205 be removed from the chain.
215 file format first appeared in