1 .\" Hey Emacs! This file is -*- nroff -*- source.
2 .\" $Id: pam.8,v 1.2 1997/02/15 18:37:27 morgan Exp $
3 .\" $FreeBSD: src/contrib/libpam/doc/man/pam.8,v 1.2.6.2 2001/06/11 15:28:11 markm Exp $
4 .\" $DragonFly: src/contrib/libpam/doc/man/Attic/pam.8,v 1.2 2003/06/17 04:24:02 dillon Exp $
5 .\" Copyright (c) Andrew G. Morgan 1996-7 <morgan@linux.kernel.org>
6 .TH PAM 8 "1997 Feb 9" "PAM 0.56" "PAM Manual"
9 PAM \- Pluggable Authentication Modules
16 This manual is intended to offer a quick introduction to
18 For more information the reader is directed to the
19 .BR "Linux-PAM system administrators' guide".
23 Is a system of libraries that handle the authentication tasks of
24 applications (services) on the system. The library provides a stable
25 general interface (Application Programming Interface - API) that
26 privilege granting programs (such as
30 defer to to perform standard authentication tasks.
33 The principal feature of the PAM approach is that the nature of the
34 authentication is dynamically configurable. In other words, the
35 system administrator is free to choose how individual
36 service-providing applications will authenticate users. This dynamic
37 configuration is set by the contents of the single
41 Alternatively, the configuration can be set by individual
42 configuration files located in the
45 .IB "The presence of this directory will cause " PAM " to ignore"
49 From the point of view of the system administrator, for whom this
50 manual is provided, it is not of primary importance to understand the
51 internal behavior of the
53 library. The important point to recognize is that the configuration
56 the connection between applications
57 .BR "" "(" services ")"
58 and the pluggable authentication modules
60 that perform the actual authentication tasks.
64 separates the tasks of
66 into four independent management groups:
67 .BR "account" " management; "
68 .BR "auth" "entication management; "
69 .BR "password" " management; "
71 .BR "session" " management."
72 (We highlight the abbreviations used for these groups in the
76 Simply put, these groups take care of different aspects of a typical
77 user's request for a restricted service:
81 provide account verification types of service: has the user's password
82 expired?; is this user permitted access to the requested service?
85 .BR auth "entication - "
86 establish the user is who they claim to be. Typically this is via some
87 challenge-response request that the user must satisfy: if you are who
88 you claim to be please enter your password. Not all authentications
89 are of this type, there exist hardware based authentication schemes
90 (such as the use of smart-cards and biometric devices), with suitable
91 modules, these may be substituted seamlessly for more standard
92 approaches to authentication - such is the flexibility of
97 this group's responsibility is the task of updating authentication
98 mechanisms. Typically, such services are strongly coupled to those of
101 group. Some authentication mechanisms lend themselves well to being
102 updated with such a function. Standard UN*X password-based access is
103 the obvious example: please enter a replacement password.
107 this group of tasks cover things that should be done prior to a
108 service being given and after it is withdrawn. Such tasks include the
109 maintenance of audit trails and the mounting of the user's home
112 management group is important as it provides both an opening and
113 closing hook for modules to affect the services available to a user.
115 .SH The configuration file(s)
119 aware privilege granting application is started, it activates its
120 attachment to the PAM-API. This activation performs a number of
121 tasks, the most important being the reading of the configuration file(s):
122 .BR /etc/pam.conf "."
123 Alternatively, this may be the contents of the
129 that will do the authentication tasks required by this service, and
130 the appropriate behavior of the PAM-API in the event that individual
137 configuration file is as follows. The file is made
138 up of a list of rules, each rule is typically placed on a single line,
139 but may be extended with an escaped end of line: `\\<LF>'. Comments
140 are preceded with `#' marks and extend to the next end of line.
143 The format of each rule is a space separated collection of tokens, the
144 first three being case-insensitive:
148 .BR " service type control module-path module-arguments"
151 The syntax of files contained in the
153 directory, are identical except for the absence of any
155 field. In this case, the
157 is the name of the file in the
159 directory. This filename must be in lower case.
162 An important feature of
164 is that a number of rules may be
166 to combine the services of a number of PAMs for a given authentication
172 is typically the familiar name of the corresponding application:
176 are good examples. The
177 .BR service "-name, " other ", "
178 is reserved for giving
180 rules. Only lines that mention the current service (or in the absence
183 entries) will be associated with the given service-application.
188 is the management group that the rule corresponds to. It is used to
189 specify which of the management groups the subsequent module is to
190 be associated with. Valid entries are:
196 The meaning of each of these tokens was explained above.
201 indicates the behavior of the PAM-API should the module fail to
202 succeed in its authentication task. Valid
206 - failure of such a PAM results in the immediate termination of the
207 authentication process;
209 - failure of such a PAM will ultimately lead to the PAM-API returning
210 failure but only after the remaining
218 - success of such a module is enough to satisfy the authentication
219 requirements of the stack of modules (if a prior
221 module has failed the success of this one is
224 - the success or failure of this module is only important if it is the
225 only module in the stack associated with this
226 .BR service "+" type "."
230 - this is the full filename of the PAM to be used by the application
234 - these are a space separated list of tokens that can be used to
235 modify the specific behavior of the given PAM. Such arguments will be
236 documented for each individual module.
239 .BR /etc/pam.conf " - the configuration file"
241 .BR /etc/pam.d/ " - the"
243 configuration directory. If this directory is present, the
247 .BR /usr/lib/libpam.so.X " - the dynamic library"
249 .BR /usr/lib/pam_*.so " - the PAMs
252 Typically errors generated by the
254 system of libraries, will be written to
258 DCE-RFC 86.0, October 1995.
260 Contains additional features, currently under consideration by the
272 .BR "System administrators" ", "
273 .BR "module developers" ", "
275 .BR "application developers" ". "