LinuxQuestions.org
Help answer threads with 0 replies.
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 07-26-2007, 04:34 PM   #1
bret
Member
 
Registered: Apr 2005
Location: SLC, Utah
Distribution: RHEL 4, RHEL 5
Posts: 59

Rep: Reputation: 16
is there a cmd to display a user's last login?


Hello there,

I am trying to find out when a user last logged into the system. I have this capability on HP-UX with the command: getprpw. This command tells me when a user last logged in. I know this command is HP specific, but want to know if anyone knows of a linux command that does the same thing.

Regards,

Bret
 
Old 07-26-2007, 04:39 PM   #2
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
Try with:
Code:
last
 
Old 07-26-2007, 04:39 PM   #3
docalton
Member
 
Registered: Dec 2002
Location: St Louis, MO
Distribution: Arch Linux
Posts: 99

Rep: Reputation: 15
You could use the last command, it list all logins since the last time the wtmp file ws cleared. Something like: last | grep jowblow

Find the last time and you've got it.

There are probably other ways also.

Hope this helps
 
Old 07-27-2007, 03:01 PM   #4
michaelnel
LQ Newbie
 
Registered: Apr 2005
Location: San Francisco, California
Posts: 12

Rep: Reputation: 0
lastlog -u username
 
  


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
Running crontab cmd for user without knowing Env DISPLAY frenchn00b Linux - General 2 07-13-2007 09:44 AM
Display IP Without Login WilliamsIT Linux - General 2 06-06-2006 10:51 AM
Give root access to user's display + sudo problems Ephracis Linux - General 12 01-11-2006 11:25 PM
Convert video mode from 32 to 24 using text login in CMD (no gui) ? HELP !!! jalalmn Linux - General 6 03-19-2005 05:06 AM
Changing a user's group at login depending on the time of day Steve2001 Linux - General 10 10-11-2004 03:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 07:36 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration