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

Hands-on lab for configuring pam_tally2

Configuring pam_tally2 is super easy because it only requires adding one line to the /etc/pam.d/login file. To make things even easier, you can just copy and paste that line from the example in the pam_tally2 man page. In spite of what I said earlier about bumping the number of failed logins up to 100, we'll keep that number at 4 for now—I know that you don't want to have to do 100 failed logins in order to demo this:

  1. On either the CentOS or the Ubuntu virtual machine, open the /etc/pam.d/login file for editing. Look for the line that invokes the pam_securetty module. (That should be around line 32 on Ubuntu and around line 2 on CentOS.) Beneath that line, insert the following line:
auth required ...
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