LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   Determining last login from a physical console (https://www.linuxquestions.org/questions/linux-security-4/determining-last-login-from-a-physical-console-285813/)

DiscoGranny 02-03-2005 11:05 AM

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.

druuna 02-03-2005 11:13 AM

Hi,

You migth have checked it out already, but you don't mention it:

Take a look at the last command.

Hope this helps.

DiscoGranny 02-03-2005 12:17 PM

Thanks that solved my problem. :)


All times are GMT -5. The time now is 10:36 PM.