Hunter的大杂烩 技术学习笔记

2017-12-06

pam_tally2 不会自动清零计数器的问题

Filed under: 技术话题 — hunter @ 2:44 pm

SuSE 11下,使用pam_tally2之后,按照man page,理应登录成功后,计数器自动清零的,但实际上遇到只增不减,3-5次之后,每次登录就要小心翼翼,很容易手误导致被封禁,国内的网站有介绍类似因为sudo导致计数器增长的问题,没提到ssh如何处理,最后终于在老外网站上找到解决方法,怀念google….

参考链接:https://www.tecmint.com/use-pam_tally2-to-lock-and-unlock-ssh-failed-login-attempts/

设置登录尝试次数:

common-auth里增加:

auth    required    pam_tally2.so    deny=5    unlock_time=60 even_deny_root root_unlock_time=60

common-account里增加

account required        pam_tally2.so

No Comments

No comments yet.

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.

Powered by WordPress