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 ignore
27 /etc/pam.conf.
28
29 Vendor-supplied PAM configuration files might be installed in the
30 system directory /usr/lib/pam.d/ or a configurable vendor specific
31 directory instead of the machine configuration directory /etc/pam.d/.
32 If no machine configuration file is found, the vendor-supplied file is
33 used. All files in /etc/pam.d/ override files with the same name in
34 other directories.
35
36 From the point of view of the system administrator, for whom this
37 manual is provided, it is not of primary importance to understand the
38 internal behavior of the Linux-PAM library. The important point to
39 recognize is that the configuration file(s) define the connection
40 between applications (services) and the pluggable authentication
41 modules (PAMs) that perform the actual authentication tasks.
42
43 Linux-PAM separates the tasks of authentication into four independent
44 management groups: account management; authentication management;
45 password management; and session management. (We highlight the
46 abbreviations used for these groups in the configuration file.)
47
48 Simply put, these groups take care of different aspects of a typical
49 user's request for a restricted service:
50
51 account - provide account verification types of service: has the user's
52 password expired?; is this user permitted access to the requested
53 service?
54
55 authentication - authenticate a user and set up user credentials.
56 Typically this is via some challenge-response request that the user
57 must satisfy: if you are who you claim to be please enter your
58 password. Not all authentications are of this type, there exist
59 hardware based authentication schemes (such as the use of smart-cards
60 and biometric devices), with suitable modules, these may be substituted
61 seamlessly for more standard approaches to authentication - such is the
62 flexibility of Linux-PAM.
63
64 password - this group's responsibility is the task of updating
65 authentication mechanisms. Typically, such services are strongly
66 coupled to those of the auth group. Some authentication mechanisms lend
67 themselves well to being updated with such a function. Standard UN*X
68 password-based access is the obvious example: please enter a
69 replacement password.
70
71 session - this group of tasks cover things that should be done prior to
72 a service being given and after it is withdrawn. Such tasks include the
73 maintenance of audit trails and the mounting of the user's home
74 directory. The session management group is important as it provides
75 both an opening and closing hook for modules to affect the services
76 available to a user.
77
79 /etc/pam.conf
80 the configuration file
81
82 /etc/pam.d
83 the Linux-PAM configuration directory. Generally, if this directory
84 is present, the /etc/pam.conf file is ignored.
85
86 /usr/lib/pam.d
87 the Linux-PAM vendor configuration directory. Files in /etc/pam.d
88 override files with the same name in this directory.
89
90 <vendordir>/pam.d
91 the Linux-PAM vendor configuration directory. Files in /etc/pam.d
92 and /usr/lib/pam.d override files with the same name in this
93 directory. Only available if Linux-PAM was compiled with vendordir
94 enabled.
95
97 Typically errors generated by the Linux-PAM system of libraries, will
98 be written to syslog(3).
99
101 DCE-RFC 86.0, October 1995. Contains additional features, but remains
102 backwardly compatible with this RFC.
103
105 pam(3), pam_authenticate(3), pam_sm_setcred(3), pam_strerror(3), PAM(8)
106
107
108
109Linux-PAM Manual 09/03/2021 PAM(8)