Fix account required
This commit is contained in:
parent
267851bd89
commit
5950438ced
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue