Intermediate LevelLinux Commands & SysAdmin
What is PAM (Pluggable Authentication Modules) in Linux security?
❓ Interview Prompt: Explain PAM architecture (/etc/pam.d/), management groups (auth, account, password, session), control flags (required, sufficient), and 2FA plugins.
PAM (Pluggable Authentication Modules) provides a modular architecture for user authentication in Linux, decoupling applications (SSH, sudo, login) from authentication backends:
Four PAM Management Groups:
1
auth: Authenticates user identity (passwords, 2FA tokens).
2
account: Checks account validity (password expiry, access times).
3
password: Handles password updates and complexity rules.
4
session: Manages user session setup/cleanup (mounting home dirs, resource limits).
Code Implementation Example
ini
# /etc/pam.d/sshd - Enforcing Google Authenticator 2FA for SSH
auth required pam_google_authenticator.so nullok
auth include postlogin💡Configuring 2FA authentication module inside PAM sshd configuration.
🎯 Interview Key Takeaway
PAM provides modular authentication rules across Linux applications without recompiling binary source code.
#PAM#Authentication#Security#Intermediate
Back to all Linux Commands & SysAdmin Questions→