方法:
现在 audit 查的很严,要严格记录 每个 user的command 记录情况, 下面就可以实现:
在unix 的 /etc/profile 中编辑:
# Start Secondary Logging
if tty >/dev/null 2>&1
then
From="`/usr/bin/who am i | awk '{ print $1 }'`"
To="`/usr/bin/whoami | awk '{ print $1 }'`"
File="$(hostname).$From:$To"
if [ ! -d /var/adm/hist/$To ]
then