PAM_DEBUG(8)
๐ PAM_DEBUG โ the pam_debug module, bestie edition ๐
okay so real talk, this one lives in the Linux-PAM Manual section 8, and it's literally the vibe-checker for your whole PAM stack. no cap. ๐ฆ
โจ NAME โจ
pam_debug โ the PAM module that's here to debug the PAM stack ๐
โจ SYNOPSIS โจ
pam_debug.so [auth=value] [cred=value] [acct=value] [prechauthtok=value]
[chauthtok=value] [auth=value] [open_session=value]
[close_session=value]
(yes auth=value shows up twice in there, that's just how it is, i don't make the rules ๐
)
โจ DESCRIPTION โจ
so like, the pam_debug PAM module is the debugging aide for figuring out how the PAM stack is actually operating. it's giving "let me tell you what's happening in here." ๐
here's the whole deal: this module returns exactly what its module arguments tell it to return. you say jump, it says how high. you say perm_denied, it returns perm_denied. no thoughts, just vibes and return codes. โจ
โจ OPTIONS โจ
every option is literally just something=value, and that value becomes the return code of the matching function. iconic behaviour, honestly.
auth=valueโ thepam_sm_authenticate(3)function will returnvalue.cred=valueโ thepam_sm_setcred(3)function will returnvalue.acct=valueโ thepam_sm_acct_mgmt(3)function will returnvalue.prechauthtok=valueโ thepam_sm_chauthtok(3)function will returnvalueif thePAM_PRELIM_CHECKflag is set.chauthtok=valueโ thepam_sm_chauthtok(3)function will returnvalueif thePAM_PRELIM_CHECKflag is not set.open_session=valueโ thepam_sm_open_session(3)function will returnvalue.close_session=valueโ thepam_sm_close_session(3)function will returnvalue.
and like, what can value even be?? glad you asked bestie, here's the whole menu, no skips, all of them ๐:
successopen_errsymbol_errservice_errsystem_errbuf_errperm_deniedauth_errcred_insufficientauthinfo_unavailuser_unknownmaxtriesnew_authtok_reqdacct_expiredsession_errcred_unavailcred_expiredcred_errno_module_dataconv_errauthtok_errauthtok_recover_errauthtok_lock_busyauthtok_disable_agingtry_againignoreabortauthtok_expiredmodule_unknownbad_itemconv_againincomplete
โจ MODULE TYPES PROVIDED โจ
ALL OF THEM. every single module type is provided โ auth, account, password and session. main character energy across the board ๐๐
โจ RETURN VALUES โจ
PAM_SUCCESSโ this is the default return code if no other value was specified. otherwise? it's the specified return value. periodt.
โจ EXAMPLES โจ
here's some config inspo for you, copy-paste ready, literally do not touch the spacing ๐ซถ:
auth requisite pam_permit.so
auth [success=2 default=ok] pam_debug.so auth=perm_denied cred=success
auth [default=reset] pam_debug.so auth=success cred=perm_denied
auth [success=done default=die] pam_debug.so
auth optional pam_debug.so auth=perm_denied cred=perm_denied
auth sufficient pam_debug.so auth=success cred=success
โจ SEE ALSO โจ
go read these too, they're the supporting cast and they ate ๐:
โจ AUTHOR โจ
pam_debug was written by Andrew G. Morgan <morgan@kernel.org>. king behaviour fr fr ๐
and that's the whole page bestie!! โจ this beauty comes to you courtesy of Linux-PAM, dated 09/27/2026 โ mwah, love that for us ๐๐๐ฆ slay, go debug something, you've got this ๐ซถ
๐ฆ 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