Create a directory called
mkdir /var/History
chmod 1733 /var/History
Create a directory called
mkdir /var/History
chmod 1733 /var/History
vi /etc/profile
Add the following
################################################################
############### Changes only with Your Company Name Here Approval ###############
################################################################
if [ -t 0 -a “${SHELL}” != “/bin/bsh” ]
then
HN=`hostname`
DATE=`date “+%Y%m%d_%H:%M:%S”`
WHO=`who -m | awk ‘{print $NF}’ | sed “s/(//g” | sed “s/)//g”`
BASEWHO=`who am i | awk ‘{print $1}’ 2>/dev/null`
PTS=`tty | cut -c6- | sed “s///-/g”`
typeset -r HISTFILE=/var/History/${HN}-${LOGIN}_sh_history-${DATE}-${LOGIN}-${BASEWHO}-${WHO}-${PTS}
fi
unset HISTCONTROL
unset HISTIGNORE
typeset -r HISTSIZE=10000
EXTENDED_HISTORY=ON
HISTTIMEFORMAT=”%F %T “
typeset -r HISTCONTROL
typeset -r HISTIGNORE
export HISTFILE HISTSIZE EXTENDED_HISTORY HISTTIMEFORMAT HISTCONTROL HISTIGNORE
################################################################