1PAM(8) Linux-PAM Manual PAM(8)
2
3
4
6 PAM, pam - Pluggable Authentication Modules for Linux
7
9 This manual is intended to offer a quick introduction to Linux-PAM. For
10 more information the reader is directed to the Linux-PAM system
11 administrators' guide.
12
13 Linux-PAM is a system of libraries that handle the authentication tasks
14 of applications (services) on the system. The library provides a stable
15 general interface (Application Programming Interface - API) that
16 privilege granting programs (such as login(1) and su(1)) defer to to
17 perform standard authentication tasks.
18
19 The principal feature of the PAM approach is that the nature of the
20 authentication is dynamically configurable. In other words, the system
21 administrator is free to choose how individual service-providing
22 applications will authenticate users. This dynamic configuration is set
23 by the contents of the single Linux-PAM configuration file
24 /etc/pam.conf. Alternatively, the configuration can be set by
25 individual configuration files located in the /etc/pam.d/ directory.
26 The presence of this directory will cause Linux-PAM to
27 ignore/etc/pam.conf.
28
29 Vendor-supplied PAM configuration files might be installed in the
30 system directory /usr/lib/pam.d/ instead of the machine configuration
31 directory /etc/pam.d/. If no machine configuration file is found, the
32 vendor-supplied file is used. All files in /etc/pam.d/ override files
33 with the same name in /usr/lib/pam.d/.
34
35 From the point of view of the system administrator, for whom this
36 manual is provided, it is not of primary importance to understand the
37 internal behavior of the Linux-PAM library. The important point to
38 recognize is that the configuration file(s) define the connection
39 between applications (services) and the pluggable authentication
40 modules (PAMs) that perform the actual authentication tasks.
41
42 Linux-PAM separates the tasks of authentication into four independent
43 management groups: account management; authentication management;
44 password management; and session management. (We highlight the
45 abbreviations used for these groups in the configuration file.)
46
47 Simply put, these groups take care of different aspects of a typical
48 user's request for a restricted service:
49
50 account - provide account verification types of service: has the user's
51 password expired?; is this user permitted access to the requested
52 service?
53
54 authentication - authenticate a user and set up user credentials.
55 Typically this is via some challenge-response request that the user
56 must satisfy: if you are who you claim to be please enter your
57 password. Not all authentications are of this type, there exist
58 hardware based authentication schemes (such as the use of smart-cards
59 and biometric devices), with suitable modules, these may be substituted
60 seamlessly for more standard approaches to authentication - such is the
61 flexibility of Linux-PAM.
62
63 password - this group's responsibility is the task of updating
64 authentication mechanisms. Typically, such services are strongly
65 coupled to those of the auth group. Some authentication mechanisms lend
66 themselves well to being updated with such a function. Standard UN*X
67 password-based access is the obvious example: please enter a
68 replacement password.
69
70 session - this group of tasks cover things that should be done prior to
71 a service being given and after it is withdrawn. Such tasks include the
72 maintenance of audit trails and the mounting of the user's home
73 directory. The session management group is important as it provides
74 both an opening and closing hook for modules to affect the services
75 available to a user.
76
78 /etc/pam.conf
79 the configuration file
80
81 /etc/pam.d
82 the Linux-PAM configuration directory. Generally, if this directory
83 is present, the /etc/pam.conf file is ignored.
84
85 /usr/lib/pam.d
86 the Linux-PAM vendor configuration directory. Files in /etc/pam.d
87 override files with the same name in this directory.
88
90 Typically errors generated by the Linux-PAM system of libraries, will
91 be written to syslog(3).
92
94 DCE-RFC 86.0, October 1995. Contains additional features, but remains
95 backwardly compatible with this RFC.
96
98 pam(3), pam_authenticate(3), pam_sm_setcred(3), pam_strerror(3), PAM(8)
99
100
101
102Linux-PAM Manual 05/18/2018 PAM(8)