PWHISTORY.CONF(5)
๐ PWHISTORY.CONF(5) ๐
okay bestie, welcome to pwhistory.conf โ that's the config file for pam_pwhistory, and yes it's part of the Linux-PAM Manual. it's giving "short file, big power" and i'm obsessed ๐
โจ NAME โจ
pwhistory.conf โ literally the configuration file for pam_pwhistory ๐ซถ
๐ธ DESCRIPTION ๐ธ
so pwhistory.conf is how you configure the default settings for saving the last passwords for each user. that's it, that's the whole vibe. this file gets read by the pam_pwhistory module, and ngl, using this file is the preferred method over configuring pam_pwhistory directly. main character energy fr ๐
the format? so so simple. it's a very straightforward name = value situation, and you can drop comments in there starting with the # character. and don't stress about spacing โ the whitespace at the beginning of the line, at the end of the line, and around the = sign is all ignored. she does not care about your formatting quirks โจ
๐ OPTIONS ๐
debugโ turns on debugging viasyslog(3). it's giving "tell me everything" ๐enforce_for_rootโ if this option is set, the check is enforced forroot, too. no exceptions, no nepo baby privileges, periodt ๐remember=Nโ the last N passwords for each user are saved. the default is10. and heads up: a value of0makes the module keep the existing contents of theopasswdfile unchanged โ so it's not "remember zero passwords", it's "don't touch anything" ๐retry=Nโ prompt the user at most N times before returning with error. the default is1๐ญfile=/path/filenameโ store the password history in the file/path/filenameinstead of the default location. the default location is/etc/security/opasswd๐
๐ EXAMPLES ๐
here's what an /etc/security/pwhistory.conf file can look like, iconic behavior:
debug
remember=5
file=/tmp/opasswd
๐ฆ FILES ๐ฆ
/etc/security/pwhistory.confโ the config file for custom options ๐
โญ SEE ALSO โญ
pwhistory(8), pam_pwhistory(8), pam.conf(5), pam.d(5), pam(8) โ go read these too, iykyk ๐
๐ AUTHOR ๐
pam_pwhistory was written by Thorsten Kukuk. and the support for pwhistory.conf was written by Iker Pedrosa. thank you kings ๐ซถ๐
okay that's the whole page bestie, you ate that ๐
Linux-PAM ยท 09/27/2026 ยท mwah, stay configured ๐ธโจ
๐ฆ 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