Particular user account shouldn't be locked after entering wrong passwd specfic no. times

Hi all

In my system we have implemented user lockout feature after 3 failure attempt if he tries to login directly or if he run the any command through sudo and enter wrong password thrice. Now I have requirement in which particular user account shouldn't be locked when he run the command through sudo and enter wrong passwword thrice means he can enter any number of wrong password with sudo command but his account should not be locked. Need your suggestion on this.

Add this to /etc/user_attr

username::::lock_after_retries=no
1 Like