Skip to main content
  1. Learn GNU/Linux/

Faillock

·216 words·2 mins
Learn Linux - This article is part of a series.
Part : This Article

tldr; #

To see if your user is locked, use this

faillock --user mario

Why is sudo refusing to accept my password? #

Have you entered your password wrong 3 times in a row when trying to sudo a command, if so and you are now seemingly locked out even if you are sure your password is correct you might be temporarily locked as your system is trying to stop bad people doing bad things.

To check use faillock like so:

18:14:18❯ faillock --user mario
mario:
When                Type  Source                                           Valid
2023-06-05 18:09:01 TTY   /dev/pts/1                                           V
2023-06-05 18:09:07 TTY   /dev/pts/1                                           V
2023-06-05 18:09:15 TTY   /dev/pts/1                                           V

You don’t want to see any entries for your username, so if you do you’ll want to add the --reset flag to clear the lock:

18:14:37❯ faillock --user mario --reset

Now if you run faillock --user mario again you should see there are no locks and you can use sudo again.

If your user isn’t mario, this article is either no use to you, or you’ll have to figure out how to switch out your username for mario… it would be easier to be called mario! It’s a meee, mario.

I have just realised that bad people might read this and now know how to get around that lock, uh oh…



Learn Linux - This article is part of a series.
Part : This Article