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,420

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