Skip to Content
Mastering Linux Security and Hardening - Second Edition
book

Mastering Linux Security and Hardening - Second Edition

by Donald A. Tevault
February 2020
Intermediate to advanced
666 pages
15h 45m
English
Packt Publishing
Content preview from Mastering Linux Security and Hardening - Second Edition

Configuring the pam_tally2 PAM 

To make this magic work, we'll rely on our good friend, the PAM. The pam_tally2 module comes already installed on both CentOS and Ubuntu, but it isn't configured. For both of our virtual machines, we'll be editing the /etc/pam.d/login file. Figuring out how to configure it is easy because there's an example at the bottom of the pam_tally2 man page:

EXAMPLES Add the following line to /etc/pam.d/login to lock the account after4 failed logins. Root account will be locked as well. The accounts will beautomatically unlocked after 20 minutes. The module does not have to becalled in the account phase because the login calls pam_setcred(3)correctly. auth required pam_securetty.so auth required pam_tally2.so deny=4 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Mastering Linux Security and Hardening - Third Edition

Mastering Linux Security and Hardening - Third Edition

Donald A. Tevault
UNIX and Linux System Administration Handbook, 5th Edition

UNIX and Linux System Administration Handbook, 5th Edition

Trent R. Hein, Evi Nemeth, Garth Snyder, Ben Whaley, Dan Mackin

Publisher Resources

ISBN: 9781838981778Supplemental Content