FAILLOG(8)
๐ธ faillog(8) โ the girl's guide to the failure log ๐ธ
Okay bestie, so this is faillog, a system management command from the Unix fam. It lives in section 8 of the manual (that's the admin section, very main character energy) and it's literally about tracking who fumbled their login.
โจ NAME โจ
faillog โ display faillog records or set login failure limits. That's it, that's the whole vibe check: it shows you the receipts of failed logins, and it can also set the limits and counters.
๐ SYNOPSIS ๐
faillog [options]
That's the whole thing. No positional weirdness, no subcommands, just vibes and options.
๐ DESCRIPTION ๐
So like, faillog displays the contents of the failure log database โ which lives at /var/log/faillog, in case you were wondering. It can also set the failure counters and limits, so it's not just a read-only princess, she does stuff too.
When you run faillog with no arguments at all? It only displays the faillog records of the users who actually had a login failure. Not everybody โ just the ones who messed up. The way that's such a mood.
๐ฆ OPTIONS ๐ฆ
These are the options that apply to the faillog command, bestie. All of them. Every single one. No skipping:
-a,--allโ Display (or act on) faillog records for all users having an entry in the faillog database.- The range of users can be restricted with the
-uoption. - In display mode, this is still restricted to existing users, but it forces the display of the faillog entries even if they are empty. Empty entries deserve screen time too ๐
- With the
-l,-m,-r,-toptions, the users' records are changed โ even if the user does not exist on the system. Which is lowkey iconic honestly, it's useful to reset records of users that have been deleted, or to set a policy in advance for a range of users.
- The range of users can be restricted with the
-h,--helpโ Display help message and exit. The classic "bestie, explain" move.-l,--lock-secs SECโ Lock the account forSECseconds after a failed login. Yes, an actual number of seconds, you don't get to be vague about this one.
Heads up: write access to /var/log/faillog is required for this option. No write access, no locking. Periodt.
-m,--maximum MAXโ Set the maximum number of login failures after the account is disabled toMAX.- Selecting a
MAXvalue of0has the effect of not placing a limit on the number of failed logins. Zero means unlimited here, which is giving chaotic neutral. - The maximum failure count should always be
0for root, to prevent a denial of services attack against the system. This one's serious, bestie โ fr fr.
- Selecting a
Write access to /var/log/faillog is required for this option. Again.
-r,--resetโ Reset the counters of login failures. Fresh start, clean slate, new era โจ
And yes โ write access to /var/log/faillog is required for this option.
-R,--root CHROOT_DIRโ Apply changes in theCHROOT_DIRdirectory and use the configuration files from theCHROOT_DIRdirectory. Only absolute paths are supported. Like, don't come at it with a relative path, it will not be charmed.-t,--time DAYSโ Display faillog records more recent thanDAYS. Just the recent drama, please.-u,--user LOGIN|RANGEโ Display the faillog record, or maintain failure counters and limits (if used with the-l,-m, or-roptions), only for the specified user(s).- The users can be specified by a login name, a numerical user ID, or a
RANGEof users. - That
RANGEof users can be specified with a min and max value (UID_MIN-UID_MAX), a max value (-UID_MAX), or a min value (UID_MIN-).
- The users can be specified by a login name, a numerical user ID, or a
And here's the lil rule that ties it all together: when none of the -l, -m, or -r options are used, faillog displays the faillog record of the specified user(s). Read-only mode, we're just looking ๐
๐ CAVEATS ๐
Okay this part matters, don't scroll past:
faillog only prints out users with no successful login since the last failure. So if someone failed, then logged in successfully after? They're invisible to the default output. Not ghosted by us โ ghosted by the tool.
To print out a user who has had a successful login since their last failure, you must explicitly request the user with the -u flag, or print out all users with the -a flag. There is no third option. I checked.
๐ FILES ๐
/var/log/faillogโ the failure logging file. That's her. That's the whole file list, she's the only one.
๐ SEE ALSO ๐
Go read those too, iykyk ๐ซถ
๐ that's the whole page, bestie โ go forth and check your failure logs ๐
Sign-off time: this little masterpiece is from shadow-utils 4.13, dated 05/30/2024. Slay. ๐
๐ฆ where this page comes from
- ubuntu noble: login 1:4.13+dfsg1-4ubuntu3.2 ยท BSD-3-Clause
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms