Determining last login from a physical console
I am writing a script that will collect information on each of the systems that run at my workplace. Collecting hardware data has not been that difficult, but I would also like to establish who is the primary user of that computer. One of the ways I thought about doing it was to run a rusers command and take the majority user as the "owner".
An easier way to do it, though, would be to look at the last user who logged onto physically to the computer (via a keyboard and monitor attached to the system) and assume that that person is the primary user. I have searched through the manpages and google as far as I could to no avail.
Do any of you have suggestions for determining the last user who logged in to a computer through a physical console (rather than remote or virtual)?
Thanks.
|