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 via syslog(3). it's giving "tell me everything" ๐Ÿ”
  • enforce_for_root โ€” if this option is set, the check is enforced for root, too. no exceptions, no nepo baby privileges, periodt ๐Ÿ’€
  • remember=N โ€” the last N passwords for each user are saved. the default is 10. and heads up: a value of 0 makes the module keep the existing contents of the opasswd file 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 is 1 ๐Ÿ˜ญ
  • file=/path/filename โ€” store the password history in the file /path/filename instead 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