PAM(7)

โœจ PAM โ€” bestie edition โœจ

okay so you opened the PAM(7) page and you're like "what is this" โ€” don't worry, I got you ๐Ÿ’– this is the quick lil intro to Linux-PAM, and if you want the full deep dive you go read the Linux-PAM system administrators' guide. This page is the vibe check, that one's the lore.


๐ŸŒธ NAME ๐ŸŒธ

PAM, pam โ€” Pluggable Authentication Modules for Linux. that's it, that's the name, iconic behavior honestly ๐Ÿ‘‘


๐Ÿ’… DESCRIPTION ๐Ÿ’…

This manual is here to give you a quick introduction to Linux-PAM. If you want more, the reader (you, bestie) gets pointed at the Linux-PAM system administrators' guide. no cap.

Linux-PAM is a system of libraries that handle the authentication tasks of applications (services) on the system. The library hands you a stable general interface โ€” the Application Programming Interface, aka the API โ€” that privilege granting programs (think login(1) and su(1)) defer to when they need to do standard authentication tasks. it's giving "let the library handle it, you just show up" ๐Ÿซถ

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. slay, autonomy. ๐Ÿ”ฅ

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. The presence of this directory will cause Linux-PAM to ignore /etc/pam.conf. yes bestie, the directory wins, the single file gets ghosted ๐Ÿ’€

Vendor-supplied PAM configuration files might be installed in the system directory /usr/lib/pam.d/ or 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 โ€” important โ€” all files in /etc/pam.d/ override files with the same name in other directories. your machine config is the main character, periodt. ๐Ÿ‘‘

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. 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. that's the whole relationship, that's the connection, that's the point. โœจ

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 โ€” iykyk ๐Ÿ‘€)

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 โ€” 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 auth group. 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 closing hook for modules to affect the services available to a user. bookends, bestie, bookends. ๐ŸŽ€

๐Ÿ—‚๏ธ FILES ๐Ÿ—‚๏ธ

  • /etc/pam.conf โ€” the configuration file
  • /etc/pam.d โ€” the Linux-PAM configuration directory. Generally, if this directory is present, the /etc/pam.conf file is ignored. (yes, again, the file gets ignored, I'm telling you twice because it matters ๐Ÿซถ)
  • /usr/lib/pam.d โ€” the Linux-PAM vendor configuration directory. Files in /etc/pam.d override 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 if something's weird, go check syslog, that's where the drama gets logged. ๐Ÿ“


โญ CONFORMING TO โญ

DCE-RFC 86.0, October 1995. Contains additional features, but remains backwardly compatible with this RFC. so like, it grew, but it didn't abandon its roots. growth, but make it backwards compatible. ๐Ÿ’œ


๐Ÿ‘€ SEE ALSO ๐Ÿ‘€


ngl bestie, the real ones always read SEE ALSO. it's literally free knowledge. ๐Ÿ’…

okay and for the cute lil sign-off: this was the PAM(7) page from the Linux-PAM Manual, dated 08/26/2026, and it's sourced from Linux-PAM itself. go forth and authenticate, you're gonna eat. ๐Ÿ”ฅ๐Ÿ‘‘โœจ

๐Ÿ“ฆ where this page comes from