LinuxCommandLibrary

faillog

login failure tracking and management

TLDR

Display failure records

$ faillog
copy
Show failures for user
$ faillog -u [username]
copy
Set failure limit
$ faillog -m [5] -u [username]
copy
Reset failure count
$ faillog -r -u [username]
copy
Set lockout time
$ faillog -l [600] -u [username]
copy

SYNOPSIS

faillog [options]

DESCRIPTION

faillog displays and manages login failure records from /var/log/faillog. It tracks failed login attempts and can enforce account lockouts after reaching a threshold.
Administrators use faillog to monitor suspicious login activity, set failure limits before account lockout, and reset counters after legitimate users are locked out. The database persists across reboots.
faillog integrates with PAM for automated account locking based on failed authentication attempts.

PARAMETERS

-a, --all

Display all users with failures.
-u USER, --user USER
Specify user to query or modify.
-m MAX, --maximum MAX
Set maximum failures before lockout.
-r, --reset
Reset failure count.
-l SECONDS, --lock-time SECONDS
Set lockout duration.
-t DAYS, --time DAYS
Show failures within N days.
--help
Display help information.

CONFIGURATION

/var/log/faillog

Binary database of login failure records, tracking failed attempts and lockout states.

CAVEATS

Requires root for modifications. Depends on PAM configuration. Not all systems use faillog database. May be superseded by pam_tally2.

HISTORY

faillog is part of the shadow-utils package, providing login failure tracking since early Linux distributions. It predates more modern PAM-based accounting but remains available for compatibility.

SEE ALSO

lastlog(1), pam_tally2(8), login(1)

> TERMINAL_GEAR

Curated for the Linux community

Bmax Mini PC B2 Power Intel 5205U 8GB DDR4 256GB M.2 NVMe SSD ,HDMI 1.4&DP 1.2, USB3.2,4K Dual Display 2.4G/5G WiFi & BT5.0 Mini Desktop Computers /Office/Design

Bmax Mini PC B2 Power Intel 5205U 8GB DDR4 256GB M.2 NVMe SSD ,HDMI 1.4&DP 1.2, USB3.2,4K Dual Display 2.4G/5G WiFi & BT5.0 Mini Desktop Computers /Office/Design

$169.99
Lenovo Gen 13 ThinkPad X1 Carbon Touchscreen Laptop with Intel Ultra 7 265U Processor, 14" WUXGA 100% sRGB, 32GB DDR5 RAM, 1TB NVMe Performance SSD, FHD+ IR+ RGB Camera, and Windows 11 Pro

Lenovo Gen 13 ThinkPad X1 Carbon Touchscreen Laptop with Intel Ultra 7 265U Processor, 14" WUXGA 100% sRGB, 32GB DDR5 RAM, 1TB NVMe Performance SSD, FHD+ IR+ RGB Camera, and Windows 11 Pro

$1,589.00
GMKtec Gaming PC, K11 AMD Ryzen 9 8945HS, 32GB DDR5 RAM 1TB Mini PC Desktop Computer, Oculink, Dual NIC 2.5GbE LAN, HDMI/DisplayPort/USB4*2

GMKtec Gaming PC, K11 AMD Ryzen 9 8945HS, 32GB DDR5 RAM 1TB Mini PC Desktop Computer, Oculink, Dual NIC 2.5GbE LAN, HDMI/DisplayPort/USB4*2

$739.99
Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community

New Raspberry Pi 3 Model B+ Board Raspberry PI 3B+

New Raspberry Pi 3 Model B+ Board Raspberry PI 3B+

$54.00
BOSGAME Mini PC N95, Intel 12th Mini Computers| 16GB DDR4 RAM| 512GB M.2 2280 SSD| 4K 60HZ Triple Displays by Dual HDMI+Type-C, 6W TDP Quiet Mini PC, WIFI5, BT 5.0 Office

BOSGAME Mini PC N95, Intel 12th Mini Computers| 16GB DDR4 RAM| 512GB M.2 2280 SSD| 4K 60HZ Triple Displays by Dual HDMI+Type-C, 6W TDP Quiet Mini PC, WIFI5, BT 5.0 Office

$239.99
GMKtec Gaming PC, K11 AMD Ryzen 9 8945HS, 32GB DDR5 RAM 1TB Mini PC Desktop Computer, Oculink, Dual NIC 2.5GbE LAN, HDMI/DisplayPort/USB4*2

GMKtec Gaming PC, K11 AMD Ryzen 9 8945HS, 32GB DDR5 RAM 1TB Mini PC Desktop Computer, Oculink, Dual NIC 2.5GbE LAN, HDMI/DisplayPort/USB4*2

$739.99