]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/libpam/doc/man/pam.8
This commit was generated by cvs2svn to compensate for changes in r57422,
[FreeBSD/FreeBSD.git] / contrib / libpam / doc / man / pam.8
1 .\" Hey Emacs! This file is -*- nroff -*- source.
2 .\" $Id: pam.8,v 1.2 1997/02/15 18:37:27 morgan Exp $
3 .\" Copyright (c) Andrew G. Morgan 1996-7 <morgan@linux.kernel.org>
4 .TH PAM 8 "1997 Feb 9" "PAM 0.56" "PAM Manual"
5 .SH NAME
6
7 PAM \- Pluggable Authentication Modules
8
9 .SH SYNOPSIS
10 .B /etc/pam.conf
11 .sp 2
12 .SH DESCRIPTION
13
14 This manual is intended to offer a quick introduction to
15 .BR PAM ". "
16 For more information the reader is directed to the
17 .BR "Linux-PAM system administrators' guide".
18
19 .sp
20 .BR PAM
21 Is a system of libraries that handle the authentication tasks of
22 applications (services) on the system.  The library provides a stable
23 general interface (Application Programming Interface - API) that
24 privilege granting programs (such as
25 .BR login "(1) "
26 and
27 .BR su "(1)) "
28 defer to to perform standard authentication tasks.
29
30 .sp
31 The principal feature of the PAM approach is that the nature of the
32 authentication is dynamically configurable.  In other words, the
33 system administrator is free to choose how individual
34 service-providing applications will authenticate users. This dynamic
35 configuration is set by the contents of the single
36 .BR PAM
37 configuration file
38 .BR /etc/pam.conf "."
39 Alternatively, the configuration can be set by individual
40 configuration files located in the
41 .B /etc/pam.d/
42 directory.
43 .IB "The presence of this directory will cause " PAM " to ignore"
44 .BI /etc/pam.conf "."
45
46 .sp
47 From the point of view of the system administrator, for whom this
48 manual is provided, it is not of primary importance to understand the
49 internal behavior of the
50 .BR PAM
51 library.  The important point to recognize is that the configuration
52 file(s)
53 .I define
54 the connection between applications
55 .BR "" "(" services ")"
56 and the pluggable authentication modules
57 .BR "" "(" PAM "s)"
58 that perform the actual authentication tasks.
59
60 .sp
61 .BR PAM
62 separates the tasks of
63 .I authentication
64 into four independent management groups:
65 .BR "account" " management; "
66 .BR "auth" "entication management; "
67 .BR "password" " management; "
68 and
69 .BR "session" " management."
70 (We highlight the abbreviations used for these groups in the
71 configuration file.)
72
73 .sp
74 Simply put, these groups take care of different aspects of a typical
75 user's request for a restricted service:
76
77 .sp
78 .BR account " - "
79 provide account verification types of service: has the user's password
80 expired?; is this user permitted access to the requested service?
81
82 .br
83 .BR auth "entication - "
84 establish the user is who they claim to be. Typically this is via some
85 challenge-response request that the user must satisfy: if you are who
86 you claim to be please enter your password.  Not all authentications
87 are of this type, there exist hardware based authentication schemes
88 (such as the use of smart-cards and biometric devices), with suitable
89 modules, these may be substituted seamlessly for more standard
90 approaches to authentication - such is the flexibility of
91 .BR PAM "."
92
93 .br
94 .BR password " - "
95 this group's responsibility is the task of updating authentication
96 mechanisms. Typically, such services are strongly coupled to those of
97 the
98 .BR auth
99 group. Some authentication mechanisms lend themselves well to being
100 updated with such a function. Standard UN*X password-based access is
101 the obvious example: please enter a replacement password.
102
103 .br
104 .BR session " - "
105 this group of tasks cover things that should be done prior to a
106 service being given and after it is withdrawn. Such tasks include the
107 maintenance of audit trails and the mounting of the user's home
108 directory. The
109 .BR session
110 management group is important as it provides both an opening and
111 closing hook for modules to affect the services available to a user.
112
113 .SH The configuration file(s)
114
115 When a
116 .BR PAM
117 aware privilege granting application is started, it activates its
118 attachment to the PAM-API.  This activation performs a number of
119 tasks, the most important being the reading of the configuration file(s):
120 .BR /etc/pam.conf "."
121 Alternatively, this may be the contents of the
122 .BR /etc/pam.d/
123 directory.
124
125 These files list the
126 .BR PAM "s"
127 that will do the authentication tasks required by this service, and
128 the appropriate behavior of the PAM-API in the event that individual
129 .BR PAM "s "
130 fail.
131
132 .sp
133 The syntax of the
134 .B /etc/pam.conf
135 configuration file is as follows. The file is made
136 up of a list of rules, each rule is typically placed on a single line,
137 but may be extended with an escaped end of line: `\\<LF>'. Comments
138 are preceded with `#' marks and extend to the next end of line.
139
140 .sp
141 The format of each rule is a space separated collection of tokens, the
142 first three being case-insensitive:
143
144 .sp
145 .br
146 .BR "   service  type  control  module-path  module-arguments"
147
148 .sp
149 The syntax of files contained in the
150 .B /etc/pam.d/
151 directory, are identical except for the absence of any
152 .I service 
153 field. In this case, the
154 .I service
155 is the name of the file in the
156 .B /etc/pam.d/
157 directory. This filename must be in lower case.
158
159 .sp
160 An important feature of
161 .BR PAM ", "
162 is that a number of rules may be
163 .I stacked
164 to combine the services of a number of PAMs for a given authentication
165 task.
166
167 .sp
168 The
169 .BR service
170 is typically the familiar name of the corresponding application:
171 .BR login
172 and 
173 .BR su
174 are good examples. The
175 .BR service "-name, " other ", "
176 is reserved for giving
177 .I default
178 rules.  Only lines that mention the current service (or in the absence
179 of such, the
180 .BR other
181 entries) will be associated with the given service-application.
182
183 .sp
184 The
185 .BR type
186 is the management group that the rule corresponds to. It is used to
187 specify which of the management groups the subsequent module is to
188 be associated with. Valid entries are:
189 .BR account "; "
190 .BR auth "; "
191 .BR password "; "
192 and
193 .BR session "."
194 The meaning of each of these tokens was explained above.
195
196 .sp
197 The third field,
198 .BR control ", "
199 indicates the behavior of the PAM-API should the module fail to
200 succeed in its authentication task. Valid
201 .BR control
202 values are:
203 .BR requisite
204 - failure of such a PAM results in the immediate termination of the
205 authentication process;
206 .BR required
207 - failure of such a PAM will ultimately lead to the PAM-API returning
208 failure but only after the remaining
209 .I stacked
210 modules (for this
211 .BR service
212 and
213 .BR type ")"
214 have been invoked;
215 .BR sufficient
216 - success of such a module is enough to satisfy the authentication
217 requirements of the stack of modules (if a prior
218 .BR required
219 module has failed the success of this one is
220 .IR ignored "); "
221 .BR optional
222 - the success or failure of this module is only important if it is the
223 only module in the stack associated with this
224 .BR service "+" type "."
225
226 .sp
227 .BR module-path
228 - this is the full filename of the PAM to be used by the application
229
230 .sp
231 .BR module-arguments
232 - these are a space separated list of tokens that can be used to
233 modify the specific behavior of the given PAM. Such arguments will be
234 documented for each individual module.
235
236 .SH "FILES"
237 .BR /etc/pam.conf " - the configuration file"
238 .br
239 .BR /etc/pam.d/ " - the"
240 .BR PAM
241 configuration directory. If this directory is present, the
242 .B /etc/pam.conf
243 file is ignored.
244 .br
245 .BR /usr/lib/libpam.so.X " - the dynamic library"
246 .br
247 .BR /usr/lib/pam_*.so " - the PAMs
248
249 .SH ERRORS
250 Typically errors generated by the
251 .BR PAM
252 system of libraries, will be written to
253 .BR syslog "(3)."
254
255 .SH "CONFORMING TO"
256 DCE-RFC 86.0, October 1995.
257 .br
258 Contains additional features, currently under consideration by the
259 DCE-RFC committee.
260
261 .SH BUGS
262 .sp 2
263 None known.
264
265 .SH "SEE ALSO"
266
267 The three
268 .BR Linux-PAM
269 Guides, for
270 .BR "System administrators" ", "
271 .BR "module developers" ", "
272 and
273 .BR "application developers" ". "