lastlog2(8) — Linux manual page

NAME | SYNOPSIS | DESCRIPTION | OPTIONS | FILES | AUTHORS | SEE ALSO | REPORTING BUGS | AVAILABILITY

LASTLOG2(8)                   User Commands                  LASTLOG2(8)

NAME         top

       lastlog2 - display date of last login for all users or a specific
       one

SYNOPSIS         top

       lastlog2 [options]

DESCRIPTION         top

       lastlog2 displays the content of the last login database. The
       login-name, last-login-time, tty and remote-host will be printed.
       The default (no flags) causes all last login entries to be
       printed, sorted by the order as written the first time into the
       database.

       Compared to lastlog this command is Y2038 safe and uses sqlite3
       to store the information and not a sparse file.

OPTIONS         top

       -b, --before DAYS
           Print only last login records older than DAYS.

       -C, --clear
           Clear last login record of a user. This option can be used
           only together with -u' (--user*).

       -d, *--database FILE
           Use FILE as lastlog2 database.

       -h, --help
           Display help message and exit.

       -i, --import FILE
           Import data from old lastlog file FILE. Existing entries in
           the lastlog2 database will be overwritten.

       -r, --rename NEWNAME
           This option can only be used together with -u (--user).

       -s, --service num
           Display PAM service used to login in the last column.

       -S, --set
           Set last login record of a user to the current time. This
           option can only be used together with -u (--user).

       -t, --time DAYS
           Print only last login records more recent than DAYS.

       -u, --users LOGINS
           Print only the last login record of the user LOGIN.

       -v, --version
           Print version number and exit.

       If the user has never logged in the message Never logged in will
       be displayed in the latest login time row.

       Only the entries for the current users of the system will be
       displayed. Other entries may exist for users that were deleted
       previously.

FILES         top

       /var/lib/lastlog/lastlog2.db
           Lastlog2 logging database file

AUTHORS         top

       lastlog2 was written by Thorsten Kukuk for liblastlog2(3).

SEE ALSO         top

       liblastlog2(3)

REPORTING BUGS         top

       For bug reports, use the issue tracker at
       https://github.com/util-linux/util-linux/issues.

AVAILABILITY         top

       The lastlog2 command is part of the util-linux package which can
       be downloaded from Linux Kernel Archive
       <https://www.kernel.org/pub/linux/utils/util-linux/>. This page
       is part of the util-linux (a random collection of Linux
       utilities) project. Information about the project can be found at
       ⟨https://www.kernel.org/pub/linux/utils/util-linux/⟩. If you have
       a bug report for this manual page, send it to
       util-linux@vger.kernel.org. This page was obtained from the
       project's upstream Git repository
       ⟨git://git.kernel.org/pub/scm/utils/util-linux/util-linux.git⟩ on
       2024-06-14. (At that time, the date of the most recent commit
       that was found in the repository was 2024-06-10.) If you discover
       any rendering problems in this HTML version of the page, or you
       believe there is a better or more up-to-date source for the page,
       or you have corrections or improvements to the information in
       this COLOPHON (which is not part of the original manual page),
       send a mail to man-pages@man7.org

util-linux 2.41.devel-537-e... 2024-06-13                    LASTLOG2(8)