Skip to Content
Mastering Linux Security and Hardening
book

Mastering Linux Security and Hardening

by Donald A. Tevault
January 2018
Intermediate to advanced
376 pages
8h 45m
English
Packt Publishing
Content preview from Mastering Linux Security and Hardening

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

Linux Security and Hardening, The Practical Security Guide

Linux Security and Hardening, The Practical Security Guide

Jason Cannon
Mastering Linux Administration

Mastering Linux Administration

Alexandru Calcatinge, Julian Balog

Publisher Resources

ISBN: 9781788620307Other