Article 55NZ7 set up failed Login attempts, now linux password doesnt work?

set up failed Login attempts, now linux password doesnt work?

by
affinity0g
from LinuxQuestions.org on (#55NZ7)
I wanted to make it so that if 3 failed password attempts occur, the password cant be typed for at least 5-10minutes.

I did the following:

Add the following lines in the file /etc/pam.d/common-auth"

auth required pam_tally2.so onerr=fail deny=3 unlock_time=300 audit
auth required pam_tally2.so onerr=fail deny=3 unlock_time=300 audit even_deny_root root_unlock_time=600

source: https://www.linuxtechi.com/lock-user...ttempts-linux/

Then I tested it running a sudo apt-get install call, purposely made 3 incorrect password attempts. Now whenever I make a sudo call, it always says the password is incorrect. Even after I restart the computer and even after more than 10 minutes has passed. Locking the workspace/unlocking and logging into the desktop works but seems like any sudo call or even a passwd change wont work. It recognizes my password as incorrect now.

I cant even edit that file anymore to remove those lines as it requires sudo.

How can i Fix this?
Why did this happen?

Many thanks!latest?d=yIl2AUoC8zA latest?i=sqD6jVKiCdg:nVW_aifueKI:F7zBnMy latest?i=sqD6jVKiCdg:nVW_aifueKI:V_sGLiP latest?d=qj6IDK7rITs latest?i=sqD6jVKiCdg:nVW_aifueKI:gIN9vFwsqD6jVKiCdg
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments