Extended Last Release 1.0

From: Matty (mattyml_at_bellsouth.net)
Date: 05/22/04


Date: Sat, 22 May 2004 10:06:35 -0400

Hello,

I posted to comp.unix.solaris a while back asking if it was possible to
print all 32-characters of a users ut_user field in a utmpx structure.
The feedback seemed to indicate that this was not possible, so I wrote
the extended last:

http://www.daemons.net/~matty/code/lastx.c

In addition to printing all 32-characters of the username, it also
allows you to print the users who have logged in within the past
X days. You can also pass the "-u" option to lastx to have it print
the the number of times a user has logged in, along with the last time
they logged in:

./lastx -d 10 -u
Username Logins Terminal Host Last Logged in
matty 45 pts/5 192.168.1.8 Sat May 22 09:35:09 2004
clay 1 pts/5 192.168.1.8 Sat May 2209:35:19 2004

The code is not the prettiest, but it seems to work ok. If you have
recommendations or feedback, I would love to hear it.

Hope folks find this useful. :)
- Ryan



Relevant Pages

  • Extended Last Release 1.0
    ... print all 32-characters of a users ut_user field in a utmpx structure. ... The feedback seemed to indicate that this was not possible, ... You can also pass the "-u" option to lastx to have it print ... The code is not the prettiest, but it seems to work ok. ...
    (comp.sys.sun.admin)
  • Extended Last Release 1.0
    ... print all 32-characters of a users ut_user field in a utmpx structure. ... The feedback seemed to indicate that this was not possible, ... You can also pass the "-u" option to lastx to have it print ... The code is not the prettiest, but it seems to work ok. ...
    (comp.security.unix)
  • Extended Last Release 1.0
    ... print all 32-characters of a users ut_user field in a utmpx structure. ... The feedback seemed to indicate that this was not possible, ... You can also pass the "-u" option to lastx to have it print ... The code is not the prettiest, but it seems to work ok. ...
    (comp.unix.solaris)