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.


admin

Our team has expertise across software and web development, WordPress, e-commerce, mobile applications, UI/UX, cloud and infrastructure, DevOps, CI/CD, API integration, security, testing, automation, and technical support. The team also works with AI-based software solutions, LLMs, AI workflows, AI agents, and intelligent application development to help businesses automate processes and build smarter digital solutions. We focus on developing, deploying, maintaining, and optimising secure, scalable, and reliable technology solutions while helping businesses adopt modern technologies and drive digital transformation.

Leave a Reply

Scroll to Top