SETTING MAX PASSWORD LOGIN ATTEMPTS PER SESSION In CENTOS -7
SETTING MAX PASSWORD LOGIN ATTEMPTS PER SESSION In CENTOS -7
Date Posted : 27/02/2019
Introduction
For every session, it is essential to set a max password login attempt. This helps to ensure that unauthorized users are prevented from attempting a brute force attack on the server. In most cases, you want to limit users to three to four attempts.
Step by step procedure :
Step 1 :
In the /etc/pam.d directory , You will find the system-auth file .
# cd /etc/pam.d
# ls -la
Step 2:
Open system-auth file using nano editor. On opening with nano editor, you can see the complete file as shown below. Edit statement pam_pwquality.so. You can change retry=3 or make it even lower.
In CentOS, this can be easily set by editing the pam_pwquality.so statement present in /etc/pam.d/system-auth
# nano /etc/pam.d/system-auth
Step 3:
Save the file.
Thus, we have successfully finished configuring the max password login attempts per session for your CentOS 7 server.
Thanks for using pheonix solutions.
You find this tutorial helpful? Share with your friends to keep it alive.