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.

and like, what can value even be?? glad you asked bestie, here's the whole menu, no skips, all of them ๐Ÿ“:

  • success
  • open_err
  • symbol_err
  • service_err
  • system_err
  • buf_err
  • perm_denied
  • auth_err
  • cred_insufficient
  • authinfo_unavail
  • user_unknown
  • maxtries
  • new_authtok_reqd
  • acct_expired
  • session_err
  • cred_unavail
  • cred_expired
  • cred_err
  • no_module_data
  • conv_err
  • authtok_err
  • authtok_recover_err
  • authtok_lock_busy
  • authtok_disable_aging
  • try_again
  • ignore
  • abort
  • authtok_expired
  • module_unknown
  • bad_item
  • conv_again
  • incomplete

โœจ 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