commit:     1e2706575348150992737c5415df36f6517b20fe
Author:     Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
AuthorDate: Sat Aug 15 08:44:57 2020 +0000
Commit:     Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
CommitDate: Sat Aug 15 08:50:19 2020 +0000
URL:        https://gitweb.gentoo.org/proj/pambase.git/commit/?id=1e270657

Add pam_pwquality.so support

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 d021b81..07e458d 100755
--- a/pambase.py
+++ b/pambase.py
@@ -9,6 +9,7 @@ def main():
        parser = argparse.ArgumentParser(description='basic Gentoo PAM 
configuration files')
        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('--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')
        parser.add_argument('--selinux', action="store_true", help='enable 
pam_selinux.so module')

diff --git a/templates/system-auth.tpl b/templates/system-auth.tpl
index 298e45c..69cc472 100644
--- a/templates/system-auth.tpl
+++ b/templates/system-auth.tpl
@@ -28,6 +28,10 @@ account         required        pam_faillock.so
 password       required        pam_passwdqc.so min=8,8,8,8,8 retry=3
 {% endif %}
 
+{% if pwquality %}
+password        required        pam_pwquality.so retry=3 minlen=8 lcredit=2 
ucredit=2 dcredit=2 ocredit=2 difok=3 enforce_for_root
+{% endif %}
+
 {% if krb5 %}
 password       [success=1 default=ignore]      pam_krb5.so {{ krb5_params }}
 {% endif %}

Reply via email to