From 46e6f29b1f9b7edd9541382fddd9b0837900e649 Mon Sep 17 00:00:00 2001 From: Mikle Kolyada Date: Sun, 13 Sep 2020 12:59:15 +0300 Subject: system-auth: introduce pam_pwhistory Signed-off-by: Mikle Kolyada --- 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 %} -- cgit v1.2.3-65-gdbad