PAM_STRESS(8)

โœจ pam_stress(8) โ€” the Linux-PAM Manual, but make it a group chat โœจ

okay bestie, pull up a chair ๐Ÿ’– you found pam_stress(8), and it's literally the drama-kid of PAM modules. it's from the Linux-PAM Manual, it lives in section 8 (that's the sysadmin section, very main character energy ๐Ÿ‘‘), and it is exactly what it sounds like: a module whose whole personality is pretending to work so you can test your PAM configs without actually breaking your login. iconic. let's get into it ๐Ÿฆ‹


๐ŸŒธ NAME ๐ŸŒธ

pam_stress โ€” the stress-testing PAM module ๐Ÿ’…


โœจ SYNOPSIS โœจ

pam_stress.so [debug] [no_warn] [use_first_pass] [try_first_pass]
              [rootok] [expired] [fail_1] [fail_2] [prelim] [required]

no arguments required, but the optional ones are where the fun is. keep reading, bestie ๐Ÿซถ


๐Ÿ’– DESCRIPTION ๐Ÿ’–

so here's the vibe: pam_stress is a PAM module whose entire job is to give the impression of failing as a fully functioning module might. that's it. that's the whole thing.

it's for testing. it cosplays a real module so you can see how your stack behaves when stuff goes sideways โ€” without nuking an actual auth path. no cap. ๐Ÿงš


๐ŸŽ€ OPTIONS ๐ŸŽ€

every flag, every one, here we go. don't skip, i'm watching ๐Ÿ‘€

  • debug โ€” dumps a lot of info into syslog. and when we say a lot, we mean it.
๐Ÿšจ IMPORTANT BESTIE: this option writes passwords to syslog. do not use anything sensitive while you're testing. like, at all. fr fr. ๐Ÿ’€
  • no_warn โ€” stops the module from giving warnings about things. (otherwise, warnings get issued through the conversation function) ๐Ÿคซ
  • use_first_pass โ€” do not prompt for a password. for the pam_sm_authentication function, it just uses item PAM_AUTHTOK. no asking, just taking โœจ
  • try_first_pass โ€” do not prompt for a password unless there's been no previous authentication token (i.e. item PAM_AUTHTOK is NULL). so it tries first, and only asks if it has nothing to work with ๐Ÿซก
  • rootok โ€” this one is intended for the pam_sm_chauthtok function, and it tells that function to let root change a user's password without entering the old password. root privileges, no questions asked ๐Ÿ‘‘
  • expired โ€” an argument intended for the account and chauthtok module parts. it tells the module to act as if the user's password has expired. drama, but make it auth ๐Ÿ˜ญ
  • fail_1 โ€” tells the module to make its first function fail. one job, done. ๐Ÿ’€
  • fail_2 โ€” tells the module to make its second function fail, if there even is one. two jobs, one of them optional ๐Ÿ“
  • prelim โ€” for pam_sm_chauthtok, this means fail on PAM_PRELIM_CHECK. ๐Ÿšฉ
  • required โ€” for pam_sm_chauthtok, this means fail if the user hasn't already been authenticated by this module. (peep the stress_new_pwd data string down in the NOTES section ๐Ÿ‘‡)

๐ŸŒˆ MODULE TYPES PROVIDED ๐ŸŒˆ

all of them, bestie. every single one. auth, account, password and session โ€” all provided. a full set. a whole wardrobe. slay ๐Ÿ’…


๐Ÿ’œ RETURN VALUES ๐Ÿ’œ

the module can hand back any of these, so let's go through them one by one:

  • PAM_BUF_ERR โ€” memory buffer error. the buffer said "not today" ๐Ÿ˜ญ
  • PAM_PERM_DENIED โ€” permission denied. nope, not you ๐Ÿšซ
  • PAM_AUTH_ERR โ€” access to the system was denied.
  • PAM_CONV_ERR โ€” conversation failure. the conversation function fumbled it ๐Ÿ™ˆ
  • PAM_SUCCESS โ€” the function passes all checks. we love to see it โœจ
  • PAM_USER_UNKNOWN โ€” the user is not known to the system. who? never heard of her ๐Ÿ’€
  • PAM_CRED_ERR โ€” failure involving user credentials.
  • PAM_NEW_AUTHTOK_REQD โ€” authentication token is no longer valid; a new one is required.
  • PAM_SESSION_ERR โ€” session failure.
  • PAM_TRY_AGAIN โ€” failed preliminary check by service.
  • PAM_AUTHTOK_LOCK_BUSY โ€” authentication token lock busy. ๐Ÿ”’
  • PAM_AUTHTOK_ERR โ€” authentication token manipulation error.
  • PAM_SYSTEM_ERR โ€” system error. the vague one. the ominous one. ๐ŸŒฉ๏ธ

๐Ÿฆ‹ NOTES ๐Ÿฆ‹

this module uses the stress_new_pwd data string, which tells pam_sm_chauthtok that pam_sm_acct_mgmt says we need a new password.

and the only possible value for this data string is 'yes'. one value. that's the whole menu. periodt. ๐Ÿ‘‘


๐ŸŒธ EXAMPLES ๐ŸŒธ

here's a little config moment for you, bestie. any of these lines will do the trick:

#%PAM-1.0
#
# Any of the following will suffice
account  required pam_stress.so
auth     required pam_stress.so
password required pam_stress.so
session  required pam_stress.so

look at that. clean. organized. a vibe. ๐ŸŽ€


๐Ÿ‘€ SEE ALSO ๐Ÿ‘€

go read these too, iykyk:


๐Ÿซถ AUTHORS ๐Ÿซถ

the pam_stress PAM module was developed by Andrew Morgan <morgan@linux.kernel.org>.

the man page for pam_stress was written by Lucas Ramage <ramage.lucas@protonmail.com>.

thank you for your service, kings ๐Ÿ’–


and that's the whole page, bestie!! ๐ŸŒˆโœจ this one comes to you from Linux-PAM, dated 09/27/2026, and it's page PAM_STRESS(8) โ€” go forth and stress-test responsibly, and remember: never put real passwords near debug. mwah ๐Ÿ’…๐ŸŽ€

๐Ÿ“ฆ where this page comes from