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 thepam_sm_authenticationfunction, it just uses itemPAM_AUTHTOK. no asking, just taking โจtry_first_passโ do not prompt for a password unless there's been no previous authentication token (i.e. itemPAM_AUTHTOKisNULL). so it tries first, and only asks if it has nothing to work with ๐ซกrootokโ this one is intended for thepam_sm_chauthtokfunction, 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โ forpam_sm_chauthtok, this means fail onPAM_PRELIM_CHECK. ๐ฉrequiredโ forpam_sm_chauthtok, this means fail if the user hasn't already been authenticated by this module. (peep thestress_new_pwddata 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
- 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