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"
7 PAM \- Pluggable Authentication Modules
14 This manual is intended to offer a quick introduction to
16 For more information the reader is directed to the
17 .BR "Linux-PAM system administrators' guide".
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
28 defer to to perform standard authentication tasks.
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
39 Alternatively, the configuration can be set by individual
40 configuration files located in the
43 .IB "The presence of this directory will cause " PAM " to ignore"
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
51 library. The important point to recognize is that the configuration
54 the connection between applications
55 .BR "" "(" services ")"
56 and the pluggable authentication modules
58 that perform the actual authentication tasks.
62 separates the tasks of
64 into four independent management groups:
65 .BR "account" " management; "
66 .BR "auth" "entication management; "
67 .BR "password" " management; "
69 .BR "session" " management."
70 (We highlight the abbreviations used for these groups in the
74 Simply put, these groups take care of different aspects of a typical
75 user's request for a restricted service:
79 provide account verification types of service: has the user's password
80 expired?; is this user permitted access to the requested service?
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
95 this group's responsibility is the task of updating authentication
96 mechanisms. Typically, such services are strongly coupled to those of
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.
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
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.
113 .SH The configuration file(s)
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
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
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.
141 The format of each rule is a space separated collection of tokens, the
142 first three being case-insensitive:
146 .BR " service type control module-path module-arguments"
149 The syntax of files contained in the
151 directory, are identical except for the absence of any
153 field. In this case, the
155 is the name of the file in the
157 directory. This filename must be in lower case.
160 An important feature of
162 is that a number of rules may be
164 to combine the services of a number of PAMs for a given authentication
170 is typically the familiar name of the corresponding application:
174 are good examples. The
175 .BR service "-name, " other ", "
176 is reserved for giving
178 rules. Only lines that mention the current service (or in the absence
181 entries) will be associated with the given service-application.
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:
194 The meaning of each of these tokens was explained above.
199 indicates the behavior of the PAM-API should the module fail to
200 succeed in its authentication task. Valid
204 - failure of such a PAM results in the immediate termination of the
205 authentication process;
207 - failure of such a PAM will ultimately lead to the PAM-API returning
208 failure but only after the remaining
216 - success of such a module is enough to satisfy the authentication
217 requirements of the stack of modules (if a prior
219 module has failed the success of this one is
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 "."
228 - this is the full filename of the PAM to be used by the application
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.
237 .BR /etc/pam.conf " - the configuration file"
239 .BR /etc/pam.d/ " - the"
241 configuration directory. If this directory is present, the
245 .BR /usr/lib/libpam.so.X " - the dynamic library"
247 .BR /usr/lib/pam_*.so " - the PAMs
250 Typically errors generated by the
252 system of libraries, will be written to
256 DCE-RFC 86.0, October 1995.
258 Contains additional features, currently under consideration by the
270 .BR "System administrators" ", "
271 .BR "module developers" ", "
273 .BR "application developers" ". "