7

The lastb and lastlog commands are not available in Ubuntu 24.10.

The last command is not installed by default. But, can be installed with:

# apt install wtmpdb

which is not exactly the same as the one in 24.04, because it is an alias of the "new" wtmpdb command which uses the new SQLite3 logging database at /var/lib/wtmpdb/wtmpdb.db. Here, only successful logins are recorded as in the /var/log/wtmp file.

A somewhat equivalent command to lastlog, named lastlog2 and which uses the new /var/lib/lastlog/lastlog2.db database is available for download; but again it is working somewhat differently compared to lastlog.

However, there seems to be no equivalent command for lastb in Ubuntu 24.10 that will display the contents of the /var/log/btmp file (or any equivalent database) for the "bad" logins.

What options do I have to use in place of the lastb command, so I can list unsuccessful logins to the system?

FedKad
  • 13,900
  • 1
    Would very much like to know the same thing! lastb was so useful to see how many bots tried to get into my new vps. – Baard Kopperud Nov 20 '24 at 23:05
  • Possibly: https://serverfault.com/questions/39407/display-recent-login-failures-on-login – Gleb Nov 20 '24 at 23:30
  • 1
    Also; to show a list of failed login attempts, use faillog. Source: https://manpages.ubuntu.com/manpages/oracular/pl/man8/faillog.8.html – Gleb Nov 20 '24 at 23:33
  • @JohnCarter faillog has been removed from Oracular just like lastlog. The package that used to provide these binaries is login. See this: https://packages.ubuntu.com/noble/amd64/login/filelist vs. https://packages.ubuntu.com/oracular/amd64/login/filelist – FedKad Nov 21 '24 at 09:38

1 Answers1

3

It has been removed. ref: https://git.launchpad.net/ubuntu/+source/util-linux/commit/?id=e8866bb93ef4cdfa36a8ec94fc43fb66d33a67e4

+util-linux (2.40.1-2) unstable; urgency=medium
+
+  * last(1) has been split off to the wtmpdb package.
+    If you find last(1) useful, please install wtmpdb and accept the default
+    PAM configuration changes from libpam-wtmpdb.
+  * lastb(1) is removed. Please see syslog/journal for failed login attempts.
+
+ -- Chris Hofstaedtler <zeha@debian.org>  Wed, 29 May 2024 23:52:19 +0200
Chang Ye
  • 131