1827293 Members
1598 Online
109717 Solutions
New Discussion

Re: user activity log

 
SOLVED
Go to solution
cch_1
Occasional Contributor

user activity log

my system (HPUX) is not a trusted/ audited system.
But i would like to retrieve a user activity log ( other than the shell history file )

Is that any clues or any areas I can trace the user activity ?
thank you.
8 REPLIES 8
RAC_1
Honored Contributor

Re: user activity log

You have very limited options without trusted system/audited system and .sh_history file.

Look at man page of script. But these files grow very fast.
There is no substitute to HARDWORK
Arunvijai_4
Honored Contributor

Re: user activity log

Hello,

You can do it by setting up history command,

In user's .profile, add the following line
HISTFILE=$HOME/.sh_history ; export HISTFILE

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
cch_1
Occasional Contributor

Re: user activity log

Thank you. I have already enabled history in my system.

Other than shell history, what can I do in order to trace the user activity in 1-2days ago ?
Arunvijai_4
Honored Contributor

Re: user activity log

Hello,

Check your system log files, /var/adm/syslog/syslog.log , OLDsyslog.log, mail.log.

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Cem Tugrul
Esteemed Contributor
Solution

Re: user activity log

Devender Khatana
Honored Contributor

Re: user activity log

Hi,

The commands are listed in the history file as mentioned earlier. You can see that and also use history command.

#history -1000

There are no other footprints available by default.

HTH,
Devender
Impossible itself mentions "I m possible"
Nguyen Anh Tien
Honored Contributor

Re: user activity log

each user has his/her own history file. It located at ~.sh_history by default!
HP is simple
rariasn
Honored Contributor

Re: user activity log

Hi cch,

Modify /etc/profile, and add,

DATE=`date +%d_%b_%o_%a_%R:%S`
DEST=`hostname`
ORI=`who -R am i | awk '{print $6}' | cut -c2- | cut -f1 -d ')'`
mkdir -p $HOME/.historicos
HISTFILE=$HOME/.historicos/$DATE.$DEST.$ORI.$LOGNAME.txt
export HISTFILE
HISTSIZE=16384
export HISTSIZE