LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices

Reply
 
Search this Thread
Old 02-03-2005, 11:05 AM   #1
DiscoGranny
LQ Newbie
 
Registered: Jun 2004
Posts: 12

Rep: Reputation: 0
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.
 
Old 02-03-2005, 11:13 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
Hi,

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

Take a look at the last command.

Hope this helps.
 
Old 02-03-2005, 12:17 PM   #3
DiscoGranny
LQ Newbie
 
Registered: Jun 2004
Posts: 12

Original Poster
Rep: Reputation: 0
Thanks that solved my problem.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Determining Number of Physical CPU sagarparadkar Solaris / OpenSolaris 4 01-12-2009 10:08 PM
"Permission Denied" for normal users on physical console brycebent Linux - Security 5 07-14-2005 11:42 PM
Determining the Active Virtual Console MasterPi Linux - General 5 05-02-2005 11:11 PM
cant login to console esgaroth Fedora 1 01-05-2005 09:11 PM
Is it possible to auto login from console rrautens Linux - Newbie 10 10-15-2003 09:30 AM


All times are GMT -5. The time now is 08:46 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration