Forrest logo
back to the lastb tool

lastb:tldr:edd17

lastb: Show a list of all last logged in users since a given time.
$ sudo lastb --since ${YYYY-MM-DD}
try on your machine

The sudo lastb --since ${YYYY-MM-DD} command is used to view the login attempts made on a Unix/Linux system that were unsuccessful.

Here's a breakdown of the command:

  • sudo: It is a command that stands for "superuser do" and allows a user with administrative privileges to execute a command as another user, typically the root user.
  • lastb: It is a command that displays the recent attempted logins to the system in a human-readable format. It reads the /var/log/btmp file where login attempts are recorded.
  • --since ${YYYY-MM-DD}: It is an option used with the lastb command to specify the starting date and time from where you want to view the attempted logins. The ${YYYY-MM-DD} placeholder should be replaced with the actual desired date in the format Year-Month-Day.

By running this command with appropriate sudo privileges and providing a specific date, you can see the failed login attempts recorded in the system log since that specified date.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the lastb tool