summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikle Kolyada <zlogene@gentoo.org>2020-09-13 12:59:15 +0300
committerMikle Kolyada <zlogene@gentoo.org>2020-09-13 13:00:50 +0300
commit46e6f29b1f9b7edd9541382fddd9b0837900e649 (patch)
tree918defca38bbbfa68c4d61b47da878a7c153e7e4
parentsystem-auth: switch password modules to configs (diff)
downloadpambase-20200917.tar.gz
pambase-20200917.tar.bz2
pambase-20200917.zip
system-auth: introduce pam_pwhistorypambase-20200917
Signed-off-by: Mikle Kolyada <zlogene@gentoo.org>
-rwxr-xr-xpambase.py1
-rw-r--r--templates/system-auth.tpl4
2 files changed, 5 insertions, 0 deletions
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 %}