How to unlock linux user after too many failed login attempts

After trying to login with the wrong password, my account is locked. When logging in on a TTY console I get the following message

mylaptop login: username
The account is locked due to 3 failed logins.
(10 minutes left to unlock)
Password: 

I am on Manjaro linux. I still have root access to this device.

How do unlock my user without waiting 10 minutes?


If you still have access to the system by another account (root or some other account with root-like (sudo?) privileges)

  1. You can view the failed logins with faillock
    root# faillock --user myUsername
    myUsername:
    When            Type     Source     Valid
    Timestamp 1     TTY      /dev/tty1  V
    Timestamp 2     TTY      /dev/tty1  V
    Timestamp 3     TTY      /dev/tty1  V
    
  2. Reset them with the --reset-flag
    root# faillock --user myUsername --reset
    root# faillock --user myUsername
    myUsername:
    When            Type     Source     Valid
    

If you've found another way to access the file system (through a rescue disk or something):

  1. Navigate to /run/faillock, this folder should contain a file with the locked username
  2. Remove the file with the username to unlock rm /run/faillock/myUsername