The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > OS Specific Forums > HP-UX
Google UNIX.COM


HP-UX HP-UX (Hewlett Packard UniX) is Hewlett-Packard's proprietary implementation of the Unix operating system, based on System V.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
tracing in linux shary Shell Programming and Scripting 2 02-04-2007 06:05 AM
tracing shary Linux 1 02-04-2007 02:33 AM
sqlplus session being able to see unix variables session within a script 435 Gavea Shell Programming and Scripting 2 07-03-2006 07:11 AM
user's right iwbasts SUN Solaris 2 06-07-2006 08:54 PM
Tracing the GPU usage solea SUN Solaris 0 07-31-2005 11:40 PM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-24-2004
Registered User
 

Join Date: Jul 2004
Location: morocco
Posts: 33
Stumble this Post!
tracing a user's session

hi,

does anyone knows how to trace a user session on a unix system:
i want to log these things

1- login
2- date of starting session
3- date of closing session

i've tryed who and last but they don't give closing time of session

regards
hmaiida
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 11-24-2004
zazzybob's Avatar
Registered Geek
 

Join Date: Dec 2003
Location: Melbourne, Australia
Posts: 2,100
Stumble this Post!
last is the command you require....
For me (SuSE 8.2 here - HP-UX 10.20 as far as I remember - i'm not at work at the moment so can't check) it shows amongst other things username, session start (date+time), session close (time only), plus duration.

Edit: Just to illustrate - sample output from "last" on HP-UX 10.20 (now that I'm at work!)

Code:
auser    ttyq8        Thu Nov 25 10:38 - 21:48  (11:09)
buser    ttyq0        Thu Nov 25 09:31   still logged in
cuser    ttyq8        Wed Nov 24 10:15 - 17:09  (06:54)
.
.
.
Cheers
ZB

Last edited by zazzybob; 11-25-2004 at 02:47 AM.
Reply With Quote
  #3 (permalink)  
Old 11-27-2004
kduffin's Avatar
UN1X
 

Join Date: Nov 2003
Location: Virginia
Posts: 441
Stumble this Post!
You can read about the auditing options that exist under HPUX in this document at docs.hp.com. Follow the document to:

-->Administering a System: Managing System Security
----->Trusted System Security

When you built your system, did you enable the "trusted" option?

Once auditing is enabled, user login and logout times are one of the default actions that are recorded. The following are the event types which default enabled for auditing:

admin - logs all administrative and privileged events
login - logs all system login and logout attempts
moddac - logs all modifications of object access controls

The referenced document walks you through setup and use of the audit functions in HPUX. Fair warning, there is an overhead cost associated with running HPUX/Trusted.

Cheers,

Keith
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 06:44 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0