• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

faillock: command not found

by Deepika

“faillock” is a command-line tool in Linux-based systems that allows users to display and modify the authentication failure record files, also known as the “faillog” file. The faillog file keeps track of the number of failed login attempts for each user on the system, and is used as part of the authentication process to prevent brute-force attacks.

The “faillock” command can be used to display the contents of the faillog file, including the username, the number of failed login attempts, and the date of the last failed attempt. It can also be used to lock or unlock a user account, based on the number of failed login attempts. For example, if a user has exceeded a certain number of failed login attempts, the “faillock” command can be used to lock their account, preventing them from logging in until an administrator unlocks it.

Additionally, using the faillock command with the appropriate options, an administrator can also clear the faillog file, or set the maximum number of failed login attempts before an account is locked.

If you encounter the below error while running the command faillock:

faillock: command not found

you may try installing the below package as per your choice of distribution:

Distribution Command
Arch Linux pacman -S pam
CentOS yum install pam
Fedora dnf install pam

faillock Command Examples

1. List login failures of all users:

# sudo faillock

2. List login failures of the specified user:

# sudo faillock --user user

3. Reset the failure records of the specified user:

# sudo faillock --user user --reset

Filed Under: Linux

Some more articles you might also be interested in …

  1. dockerd Command Examples in Linux
  2. How to Install Gnome Desktop Environment onto Oracle Linux 6.x
  3. How To Setup mutt in CentOS/RHEL
  4. a2dissite: command not found
  5. ceph Command Examples in Linux
  6. a2enmod: command not found
  7. tuned-adm and Oracle
  8. Unable To Extend LVM File System with Associated Snapshot in CentOS/RHEL
  9. hlint: command not found
  10. How to Configure Automatic Package Updates on the Server in CentOS/RHEL 8

You May Also Like

Primary Sidebar

Recent Posts

  • nixos-rebuild Command Examples in Linux
  • nixos-option: Command Examples in Linux
  • nixos-container : Command Examples in Linux
  • nitrogen Command Examples in Linux

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright