cancel
Showing results for 
Search instead for 
Did you mean: 
Trevor
Commander Commander
Commander
  • 742 Views

Failed Login Attempts

Where do I configure the max number of login attempts by a user, so that when that number is exceeded, the user account is locked?  Is there a single command I use?  Is there some file that I have to edit/modify?

Trevor "Red Hat Evangelist" Chandler
Labels (3)
4 Replies
Blue_bird
Starfighter Starfighter
Starfighter
  • 711 Views

The user account faillock options should be stored in/etc/security/faillock.conf:

deny=4
unlock_time=1200
silent

Thanks

Trevor
Commander Commander
Commander
  • 647 Views

Thanks Blue_bird!!

Trevor "Red Hat Evangelist" Chandler
0 Kudos
Chetan_Tiwary_
Community Manager
Community Manager
  • 667 Views

@Trevor If you have RHEL 7 , you can use this command :

authconfig --enablefaillock --faillockargs="deny=6 unlock_time=1200" --update

or choose to include pam_faillock in /etc/pam.d/system-auth and /etc/pam.d/password-auth  ( refer : https://access.redhat.com/solutions/7002274 ).

 

otherwise for RHEL 8 & 9 use as mentioned by @Blue_bird :

/etc/security/faillock.conf :

deny=4
unlock_time=1200
silent
Trevor
Commander Commander
Commander
  • 647 Views

Thanks Chetan for taking me back down memory lane, with how to get things done in RHEL 7.  I've consulted with the judges, and they say, the RHEL 9.X solution it is!!!

 

Trevor "Red Hat Evangelist" Chandler
0 Kudos
Join the discussion
You must log in to join this conversation.