From 5950438ced6e3cadc307893f29547be2362e2a70 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 6 Aug 2017 13:50:52 +0100 Subject: [PATCH] Fix account required --- src/freedombone-utils-setup | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/freedombone-utils-setup b/src/freedombone-utils-setup index 9d204f4a..ecfe5d1f 100755 --- a/src/freedombone-utils-setup +++ b/src/freedombone-utils-setup @@ -465,12 +465,8 @@ function set_max_login_tries { fi fi - if ! grep -q ' deny=' /etc/pam.d/common-account; then + if ! grep -q 'account required\t\t\tpam_tally.so' /etc/pam.d/common-account; then sed -i '/pam_deny.so/a account required\t\t\tpam_tally.so' /etc/pam.d/common-account - else - if ! grep -q " deny=$max_tries" /etc/pam.d/common-account; then - sed -i "s| deny=.*| deny=$max_tries|g" /etc/pam.d/common-account - fi fi }