mirror of
https://github.com/konstruktoid/hardening.git
synced 2026-04-27 01:35:55 +03:00
[GH-ISSUE #140] [BUG] Pam_tally config not working #58
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @llouxi on GitHub (Jun 20, 2022).
Original GitHub issue: https://github.com/konstruktoid/hardening/issues/140
Originally assigned to: @konstruktoid on GitHub.
Describe the bug
Pam_tally2 counters are not automatically reset after unlock_time.
Accounts must be unlocked manually from cli.
To Reproduce
Try to login more than 5 times using a bad password, wait for unlock time and try logging in with the correct password.
The login will fail as pam_tally2 counter is not automatically reset by current config.
Expected behavior
Pam_tally2 counters should reset to 0 after unlock_time.
The following config in script password seems to work:
if ! grep tally2 "$COMMONACCOUNT"; then sed -i '/^$/a account required pam_tally2.so' "$COMMONACCOUNT" fiSystem (lsb_release -a):
Tested on Ubuntu 18.04.4 LTS and Ubuntu 20.04.4 LTS
Additional context
Reference used for troubleshooting: https://unix.stackexchange.com/questions/560196/why-does-this-pam-code-prevent-all-logins-to-a-debian-system
@konstruktoid commented on GitHub (Jun 20, 2022):
Hi @llouxi and thanks for opening this issue, I'll have a look at it as soon as possible.
@konstruktoid commented on GitHub (Jun 20, 2022):
When installing on Ubuntu 20.04.4, isn't
faillockused instead?@llouxi commented on GitHub (Jun 21, 2022):
Tested again on a fresh install,
faillockis used on ubuntu 20.04.4 but common-auth is not configured properly so configuration seems partial for faillock.Current issue is however valid on systems without faillock.
@konstruktoid commented on GitHub (Jun 21, 2022):
Will focus on
faillocksincepam_tally2is deprecated with20.04.@konstruktoid commented on GitHub (Jun 21, 2022):
@konstruktoid commented on GitHub (Jun 21, 2022):
@llouxi, could you please test https://github.com/konstruktoid/hardening/pull/145?
@llouxi commented on GitHub (Jun 22, 2022):
thanks for the quick fix, tested and all good now
@konstruktoid commented on GitHub (Jun 22, 2022):
Merged.