Skip to main content

Linux command: lastlog

The last one

lastlog command reports the most recent login of all users or of a given user.

Example of Linux command lastlog on RHEL

NAME
       lastlog - reports the most recent login of all users or of a given
       user

SYNOPSIS
       lastlog [options]

DESCRIPTION
       lastlog formats and prints the contents of the last login log
       /var/log/lastlog file. The login-name, port, and last login time
       will be printed. The default (no flags) causes lastlog entries to
       be printed, sorted by their order in /etc/passwd.

OPTIONS
       The options which apply to the lastlog command are:

       -b, --before DAYS
           Print only lastlog records older than DAYS.

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

       -R, --root CHROOT_DIR
           Apply changes in the CHROOT_DIR directory and use the
           configuration files from the CHROOT_DIR directory.

       -t, --time DAYS
           Print the lastlog records more recent than DAYS.

       -u, --user LOGIN|RANGE
           Print the lastlog record of the specified user(s).

           The users can be specified by a login name, a numerical user
           ID, or a RANGE of users. This RANGE of users can be specified
           with a min and max values (UID_MIN-UID_MAX), a max value
           (-UID_MAX), or a min value (UID_MIN-).

       If the user has never logged in the message ** Never logged in**
       will be displayed instead of the port and time.

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

Popular posts from this blog

hmailserver: Notes from the field

hmailserver is one of free open source mail servers running on Microsoft Windows operating system.

stegseek: Notes

StegCracker has been retired following the release of StegSeek, which will blast through the rockyou.txt wordlist within 1.9 second as opposed to StegCracker which takes ~5 hours.

VMware ESXi host loads ipmi_si_drv too long

Workaround: remove ipmi_si_drv esxcli software vib remove --dry-run --vibname ipmi-ipmi-si-drv esxcli software vib remove --vibname ipmi-ipmi-si-drv ~ # esxcli software vib remove --dry-run --vibname ipmi-ipmi-si-drv Removal Result    Message: Dryrun only, host not changed. The following installers will be applied: [BootBankInstaller]    Reboot Required: true    VIBs Installed:    VIBs Removed: VMware_bootbank_ipmi-ipmi-si-drv_39.1-4vmw.550.0.0.1331820    VIBs Skipped: ~ # ~ # esxcli software vib remove --vibname ipmi-ipmi-si-drv Removal Result    Message: The update completed successfully, but the system needs to be rebooted for the changes to be effective.    Reboot Required: true    VIBs Installed:    VIBs Removed: VMware_bootbank_ipmi-ipmi-si-drv_39.1-4vmw.550.0.0.1331820    VIBs Skipped: ~ #