PAM(8)
๐ PAM(8) โ Pluggable Authentication Modules for Linux ๐
okay bestie, sit DOWN, because this is the manual page for PAM, aka pam, and it's literally the thing that decides whether you get to log in or not. It lives in the Linux-PAM Manual section 8 (that's the admin commands section, iykyk). This page is just a lil intro to Linux-PAM โ a vibe check, not the whole saga. If you want the deep lore, the reader (that's you ๐ซถ) is directed to the Linux-PAM system administrators' guide.
โจ DESCRIPTION โจ
So what IS Linux-PAM, bestie? It's a system of libraries that handle the authentication tasks of applications (a.k.a. services) on the system. The library hands out a stable general interface โ that's the Application Programming Interface (API) โ and privilege granting programs like login(1) and su(1) just defer to it to do their standard authentication tasks. They don't do the work themselves. They outsource it. Iconic behavior, honestly. ๐
The principal feature of the PAM approach is that the nature of the authentication is dynamically configurable. In other words: the system administrator is free to choose how individual service-providing applications will authenticate users. Main character energy for sysadmins, fr fr.
This dynamic configuration gets set by the contents of the single Linux-PAM configuration file:
/etc/pam.conf
Alternatively โ and preferably โจ โ the configuration can be set by individual configuration files located in a pam.d directory. And here's the thing: the mere presence of this directory will cause Linux-PAM to ignore /etc/pam.conf. It doesn't ask. It doesn't negotiate. Directory's there, pam.conf is getting ghosted. ๐
Also, vendor-supplied PAM configuration files might be installed in the system directory:
/usr/lib/pam.d/
or in a configurable vendor specific directory, instead of the machine configuration directory /etc/pam.d/. If no machine configuration file is found, the vendor-supplied file is used. And the rule is simple: all files in /etc/pam.d/ override files with the same name in other directories. Local wins. Periodt.
Now, from the point of view of the system administrator โ for whom this manual is provided, hi bestie, this one's for you โ it is not of primary importance to understand the internal behavior of the Linux-PAM library. Like, you don't need to know how the sausage is made. The important point to recognize is that the configuration file(s) define the connection between applications (services) and the pluggable authentication modules (PAMs) that perform the actual authentication tasks.
Linux-PAM separates the tasks of authentication into four independent management groups:
- account management
- authentication management
- password management
- session management
(We highlight the abbreviations used for these groups in the configuration file. ๐)
Simply put, these groups take care of different aspects of a typical user's request for a restricted service:
- account โ provide account verification types of service: has the user's password expired? is this user permitted access to the requested service?
- authentication โ authenticate a user and set up user credentials. Typically this is via some challenge-response request that the user must satisfy: if you are who you claim to be please enter your password. Not all authentications are of this type though, bestie โ there exist hardware based authentication schemes (such as the use of smart-cards and biometric devices), and with suitable modules, these may be substituted seamlessly for more standard approaches to authentication. Such is the flexibility of Linux-PAM. ๐ฆ
- password โ this group's responsibility is the task of updating authentication mechanisms. Typically, such services are strongly coupled to those of the
authgroup. Some authentication mechanisms lend themselves well to being updated with such a function. Standard UN*X password-based access is the obvious example: please enter a replacement password. - session โ this group of tasks covers things that should be done prior to a service being given and after it is withdrawn. Such tasks include the maintenance of audit trails and the mounting of the user's home directory. The session management group is important as it provides both an opening and a closing hook for modules to affect the services available to a user. Two hooks, one group, we love a multitasker. ๐
๐ธ FILES ๐ธ
/etc/pam.confโ the configuration file/etc/pam.dโ the Linux-PAM configuration directory. Generally, if this directory is present, the/etc/pam.conffile is ignored./usr/lib/pam.dโ the Linux-PAM vendor configuration directory. Files in/etc/pam.doverride files with the same name in this directory.
๐ญ ERRORS ๐ญ
Typically errors generated by the Linux-PAM system of libraries will be written to syslog(3). So like, if something's wrong, check your logs, bestie. That's where the tea is. ๐
๐ CONFORMING TO ๐
DCE-RFC 86.0, October 1995. It contains additional features, but remains backwardly compatible with this RFC. Glow up without breaking anyone. โจ
๐ SEE ALSO ๐
and that's the whole page, bestie โ every flag-free, option-free, vibe-heavy word of it. This was brought to you by Linux-PAM, dated 09/27/2026. Go forth and authenticate responsibly. ๐ซถ๐โจ
๐ฆ where this page comes from
- arch rolling: pam 1.7.3-1 ยท GPL-2.0-only
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms