The PAM library, libpam(3LIB), is the central element in the PAM architecture:
libpam exports an API, pam(3PAM). Applications can call this API for authentication, account management, credential establishment, session management, and password changes.
libpam looks for the PAM configuration in /etc/pam.conf or the per-service PAM policy files in /etc/pam.d. The PAM configuration specifies the PAM module requirements for each available service and is managed by a system administrator.
libpam imports an SPI, pam_sm(3PAM), which is exported by the service modules.