From 1180bde923a22605fe8075cd1fe7992ed7513411 Mon Sep 17 00:00:00 2001 From: Iker Pedrosa Date: Fri, 8 Jul 2022 15:40:40 +0200 Subject: pam_pwhistory: document config load from file * modules/pam_pwhistory/pam_pwhistory.8.xml: Add new option to select configuration file to read. * modules/pam_pwhistory/pwhistory.conf.5.xml: Document configuration options for the file. * modules/pam_pwhistory/Makefile.am (dist_man_MANS): Add pwhistory.conf.5. (XMLS): Add pwhistory.conf.5.xml. Signed-off-by: Iker Pedrosa --- modules/pam_pwhistory/Makefile.am | 5 +- modules/pam_pwhistory/pam_pwhistory.8.xml | 27 ++++- modules/pam_pwhistory/pwhistory.conf.5.xml | 155 +++++++++++++++++++++++++++++ 3 files changed, 184 insertions(+), 3 deletions(-) create mode 100644 modules/pam_pwhistory/pwhistory.conf.5.xml (limited to 'modules/pam_pwhistory') diff --git a/modules/pam_pwhistory/Makefile.am b/modules/pam_pwhistory/Makefile.am index a50fdc74..c29a8e11 100644 --- a/modules/pam_pwhistory/Makefile.am +++ b/modules/pam_pwhistory/Makefile.am @@ -9,9 +9,10 @@ MAINTAINERCLEANFILES = $(MANS) README EXTRA_DIST = $(XMLS) if HAVE_DOC -dist_man_MANS = pam_pwhistory.8 pwhistory_helper.8 +dist_man_MANS = pam_pwhistory.8 pwhistory_helper.8 pwhistory.conf.5 endif -XMLS = README.xml pam_pwhistory.8.xml pwhistory_helper.8.xml +XMLS = README.xml pam_pwhistory.8.xml pwhistory_helper.8.xml \ + pwhistory.conf.5.xml dist_check_SCRIPTS = tst-pam_pwhistory TESTS = $(dist_check_SCRIPTS) diff --git a/modules/pam_pwhistory/pam_pwhistory.8.xml b/modules/pam_pwhistory/pam_pwhistory.8.xml index df16a776..2a8fa7f6 100644 --- a/modules/pam_pwhistory/pam_pwhistory.8.xml +++ b/modules/pam_pwhistory/pam_pwhistory.8.xml @@ -39,6 +39,9 @@ file=/path/filename + + conf=/path/to/config-file + @@ -107,7 +110,7 @@ The last N passwords for each - user are saved in /etc/security/opasswd. + user are saved. The default is 10. Value of 0 makes the module to keep the existing contents of the opasswd file unchanged. @@ -153,7 +156,26 @@ + + + + + + + Use another configuration file instead of the default + /etc/security/pwhistory.conf. + + + + + + The options for configuring the module behavior are described in the + pwhistory.conf + 5 manual page. The options + specified on the module command line override the values from the + configuration file. + @@ -238,6 +260,9 @@ password required pam_unix.so use_authtok SEE ALSO + + pwhistory.conf5 + , pam.conf5 , diff --git a/modules/pam_pwhistory/pwhistory.conf.5.xml b/modules/pam_pwhistory/pwhistory.conf.5.xml new file mode 100644 index 00000000..bac5ffed --- /dev/null +++ b/modules/pam_pwhistory/pwhistory.conf.5.xml @@ -0,0 +1,155 @@ + + + + + + + pwhistory.conf + 5 + Linux-PAM Manual + + + + pwhistory.conf + pam_pwhistory configuration file + + + + + DESCRIPTION + + pwhistory.conf provides a way to configure the + default settings for saving the last passwords for each user. + This file is read by the pam_pwhistory module and is the + preferred method over configuring pam_pwhistory directly. + + + The file has a very simple name = value format with possible comments + starting with # character. The whitespace at the beginning of line, end + of line, and around the = sign is ignored. + + + + + + OPTIONS + + + + + + + + Turns on debugging via + + syslog3 + . + + + + + + + + + + If this option is set, the check is enforced for root, too. + + + + + + + + + + The last N passwords for each + user are saved. + The default is 10. Value of + 0 makes the module to keep the existing + contents of the opasswd file unchanged. + + + + + + + + + + Prompt user at most N times + before returning with error. The default is 1. + + + + + + + + + + Store password history in file + /path/filename rather than the default + location. The default location is + /etc/security/opasswd. + + + + + + + + EXAMPLES + + /etc/security/pwhistory.conf file example: + + +debug +remember=5 +file=/tmp/opasswd + + + + + FILES + + + /etc/security/pwhistory.conf + + the config file for custom options + + + + + + + SEE ALSO + + + pwhistory8 + , + + pam_pwhistory8 + , + + pam.conf5 + , + + pam.d5 + , + + pam8 + + + + + + AUTHOR + + pam_pwhistory was written by Thorsten Kukuk. The support for + pwhistory.conf was written by Iker Pedrosa. + + + + -- cgit v1.2.3