Use it when configuring, checking or troubleshooting PAM in Linux Security.
PAM
Pluggable Authentication Modules provide configurable authentication, account, session and password-management stacks for PAM-aware services, with outcome determined by module order, control flags, service file and application integration.
1. PAM modules control authentication, account, password and session.
2. Order and control flags matter.
3. pam_faillock for lockout, pam_pwquality for passwords.
4. Use authselect/pam-auth-update to manage.
5. Test changes with a second session open.
login → PAM stack → modules → result
Context & applicabilityCommon mistakes · platform/version boundaries
A PAM result shows the configured stack returned a status to a participating application, but it does not show the application enforced it correctly or non-PAM paths are controlled.
Suspicious evidence: wrong service file, include recursion/order, sufficient bypass, missing account phase, fail-open module error, application ignores result, debug secrets or local/remote stack mismatch.
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Verification path Verify boundary
PAM-aware application/service → service stack/includes → auth modules/control flow → account check → session/password modules → application decision → logs
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
- PAM configured ≠ every authentication path uses PAM.
- One module success ≠ stack success or account/session authorization.
- Configuration file present ≠ parsed, loaded and effective runtime state.
- One allow/deny result ≠ complete DAC, privilege, LSM, firewall and application outcome.
cat /etc/pam.d/sshd /etc/pam.d/common-auth— PAM stacksauthselect current— RHEL profilefaillock --user <u>— lockout state
ReferenceWhat it is2 sections · depth on demand
Scope and canonical references
This Topic covers PAM as a security control: lockout, password quality, MFA modules and hardening review.
- How PAM stacks, module types and control flags work: the canonical PAM Topic under Linux → Security.
- Privileged Access Management (the other "PAM"): Privileged Access Management.
Reading a PAM stack
Files in /etc/pam.d/ list modules per type: auth, account, password, session, with control flags (required, requisite, sufficient, optional).
Common modules: pam_unix (local passwords), pam_sss (SSSD/AD), pam_faillock (lockout), pam_pwquality (password strength), pam_google_authenticator/pam_u2f (MFA).
A mistake can lock everyone out: keep a root session open while testing, and test with pamtester or a second login.
ReferenceImportant terms & boundaries2 sections · depth on demand
What this shows and what it does not
A PAM result shows the configured stack returned a status to a participating application, but it does not show the application enforced it correctly or non-PAM paths are controlled.
In depth
PAM (Pluggable Authentication Modules) is the framework Linux uses to authenticate users and manage sessions for services such as SSH, sudo and login. Modules stacked in /etc/pam.d/ add features — MFA, password quality rules, account lockout, centralised authentication.
| Module | Purpose |
|---|---|
pam_unix | Local passwords |
pam_sss | Central authentication via SSSD (AD/LDAP/IPA) |
pam_faillock | Lockout after failed attempts |
pam_pwquality | Password strength rules |
pam_google_authenticator, pam_u2f | TOTP / FIDO2 MFA |
pam_limits | Resource limits |
Test PAM changes in a separate session before logging out — a broken PAM stack can lock everyone out. Use distribution tools (authselect, pam-auth-update) where available instead of editing files by hand.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Linux Security → PAM. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://docs.kernel.org/security/ · confidence 94%Terms & aliases
Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.
Quick lookup tables
Linux Security → PAM proof map
Fast scope, effective-state, runtime-evidence and closure boundaries for Linux Security → PAM.
| Boundary | Establish | Does not establish |
|---|---|---|
| Scope | Exact host, role, build/kernel, identity, workload and expected control | Does not prove policy receipt or effective runtime state |
| Effective state | Resultant/loaded policy, precedence, mode, labels/rules/keys and active services/kernel controls | Configuration presence does not prove enforcement |
| Runtime evidence | Correlated events/audit, process/token/credential, packet/syscall and workload result | One event, clean status or allow/deny does not prove complete security |
| Closure | Original allowed/denied workload works, unsafe state is removed and recovery/regression pass | Commit, restart, block or compliance result alone is not closure |