Operating System - HP-UX
1748045 Members
5253 Online
108757 Solutions
New Discussion юеВ

Multiple history file creation in hp ux

 
HP UX Admin
Advisor

Multiple history file creation in hp ux

how can i create the multiple history file in hpux.

All root commands should be appear in syslog.log file too.

6 REPLIES 6
Manix
Honored Contributor

Re: Multiple history file creation in hp ux

As far as i know there is a history file
for each user in it`s home directory if you
add the following entries in /etc/profile

export HISTFILE=$HOME/.sh_history

export HISRSIZE=5000

logoff & login again

check with Cntrl + k

otherwise run
set -o vi
Cntrl + k

I am not sure if all root commands logs in syslog.log as a feature in native OS HP-UX.
HP-UX been always lovable - Mani Kalra
HP UX Admin
Advisor

Re: Multiple history file creation in hp ux

Are there any way to redirect all root user history file entries to syslog.

We have a syslog server to monitor the system.
Manix
Honored Contributor

Re: Multiple history file creation in hp ux

i don`t think so there is a such way . you can
enable auditing to keep track of commands
if you like that.

http://docstore.mik.ua/manuals/hp-ux/en/B2355-60130/audsys.1M.html
HP-UX been always lovable - Mani Kalra
Hakki Aydin Ucar
Honored Contributor

Re: Multiple history file creation in hp ux

Why don't you put an simple script in cronjob so it can periodically forward the root history files to the server ? like ,

rcp .sh_history server:/tmp
Victor Fridyev
Honored Contributor

Re: Multiple history file creation in hp ux

Create a daemon which runs:

tail -f $HISTFILE >> /var/adm/syslog/syslog.log
Entities are not to be multiplied beyond necessity - RTFM
Dennis Handly
Acclaimed Contributor

Re: Multiple history file creation in hp ux

You could also use script(1) to capture the input/output in a typescript file.