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: myUsername
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?
2 Answers
If you still have access to the system by another account (root or some other account with root-like (sudo?) privileges)
- You can view the failed logins with
faillockroot# 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
- Reset them with the
--reset-flagroot# 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):
- Navigate to
/run/faillock, this folder should contain a file with the locked username - Remove the file with the username to unlock
rm /run/faillock/myUsername
"sudo" and "faillock" - How to handle "The account is locked due to X failed logins."
If you still have access with root-like privileges, you can view the failed logins...
faillock --user [USERNAME]... and/or reset attempts status...
faillock --user [USERNAME] --resetPLUS:
You can change the possible attempts number before a lock by uncommenting and changing the parameter...
# deny = 3... in the file...
vi /etc/security/faillock.confNormally faillock automatically unlocks the account after 10 minutes (600 seconds), but you can change that too...
# unlock_time = 600[Ref(s).: ]