in reply to &cow;Re: View last login times of everyone on your system
in thread View last login times of everyone on your system

BSD-derived systems generally have both last and lastlog, and they do different things. Generally the log used by last is truncated routinely, so you won't get history back to day one, whereas the /var/log/lastlog file is also the file used by login to tell you when you last logged in, so it never gets truncated.

-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.

  • Comment on •Re: &cow;Re: View last login times of everyone on your system

Replies are listed 'Best First'.
&cattle;Re: View last login times of everyone on your system
by Roy Johnson (Monsignor) on Jan 15, 2004 at 20:23 UTC
    Thanks. For others who don't have helpful man pages: on Solaris, at least, it's in /var/adm, and the structure of the file can be deciphered from /usr/include/lastlog.h: my $struct_lastlog = "L a8 a16";

    The PerlMonk tr/// Advocate