How to access all user history file

Team ,

using fc command we can get details of our history file .. Is it possible to get the same result for different user from root.. Actually I need to collect all the stuff from select users history file for day to day basis.

thanks in advance ..

Big brother ... :eek:

Yes it'll be called '.sh_history' or '.kshrc_history' or '.bash_history' (depending on the user's shell) in the top-level of each user's home directory. Try:

ls /home/*/*.history

big "bother" squared - we are SOX compliant.

If your shell honors $HISTFILE you can create a history file anywhere you want during login
We have ours like this

/home/[somewhere]/.ihist/.sh_hist_jmcnama

All of the interactive users' histories are there in the same .ihist directory. We set HISTSIZE=1000 to keep track for a while. This allows an easy scan of history to find out "whodunit" if there is a security problem.

This is a SOX requirement - be able to look up all interactives users commands for the past 30 days. We have accounting turned on too.