AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.


#Power
#Power
 View Only
  • 1.  'who' logs in + audit

    Posted Wed October 01, 2008 01:02 PM

    Originally posted by: SystemAdmin


    Hi,

    Can anyone help me with a script which would monitor who logs in, and also turn on the audit command if a particular user logs in.

    G
    #AIX-Forum


  • 2.  Re: 'who' logs in + audit

    Posted Thu October 02, 2008 12:56 AM

    Originally posted by: SystemAdmin


    Hi,

    Can't you get this info using the last command or the fwtmp command? Then to actually see what a user has been doing, look in the user .sh_history file.

    We have the following set in /etc/profile so that the history can be used as an audit trail.
    
    # HISTORY environment variables 
    
    for all users and a login timestamp HISTSIZE=1000 EXTENDED_HISTORY=ON HISTDATEFMT=
    '%d/%m/%Y %H:%M:%S' FCEDIT=/usr/bin/vi export HISTSIZE EXTENDED_HISTORY HISTDATEFMT FCEDIT   userDetail=`who am i | tr -s 
    ' '` echo 
    "## $userDetail " | read -s echo 
    "##\n\n" | read -s
    

    We then have a perl script to view other user's history and display in the same format as "history -t".

    Regards,
    Spook
    #AIX-Forum