commit: 46e6f29b1f9b7edd9541382fddd9b0837900e649
Author: Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
AuthorDate: Sun Sep 13 09:59:15 2020 +0000
Commit: Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
CommitDate: Sun Sep 13 10:00:50 2020 +0000
URL: https://gitweb.gentoo.org/proj/pambase.git/commit/?id=46e6f29b
system-auth: introduce pam_pwhistory
Signed-off-by: Mikle Kolyada <zlogene <AT> gentoo.org>
pambase.py | 1 +
templates/system-auth.tpl | 4 ++++
2 files changed, 5 insertions(+)
diff --git a/pambase.py b/pambase.py
index 83ee97c..de5dddb 100755
--- a/pambase.py
+++ b/pambase.py
@@ -10,6 +10,7 @@ def main():
parser.add_argument('--gnome-keyring', action="store_true", help='enable
pam_gnome_keyring.so module')
parser.add_argument('--libcap', action="store_true", help='enable
pam_caps.so module')
parser.add_argument('--passwdqc', action="store_true", help='enable
pam_passwdqc.so module')
+ parser.add_argument('--pwhistory', action="store_true", help='enable
pam_pwhistory.so module')
parser.add_argument('--pwquality', action="store_true", help='enable
pam_pwquality.so module')
parser.add_argument('--elogind', action="store_true", help='enable
pam_elogind.so module')
parser.add_argument('--systemd', action="store_true", help='enable
pam_systemd.so module')
diff --git a/templates/system-auth.tpl b/templates/system-auth.tpl
index 0381e66..46fc131 100644
--- a/templates/system-auth.tpl
+++ b/templates/system-auth.tpl
@@ -32,6 +32,10 @@ password required pam_passwdqc.so
config=/etc/security/passwdqc.conf
password required pam_pwquality.so
{% endif %}
+{% if pwhistory %}
+password required pam_pwhistory.so use_authtok remember=5 retry=3
+{% endif %}
+
{% if krb5 %}
password [success=1 default=ignore] pam_krb5.so {{ krb5_params }}
{% endif %}