1,创建工作目录mkdir /usr/local/proxy/
vi proxy
#!/bin/bash
Tmpfile=`mktemp`
User=$USER
Ip=${SSH_CLIENT%% *}
Date="`date +%Y-%m-%d`"
Logfile="/var/log/myaudit/${Date}_${User}_$Ip.log"
exec /usr/bin/script -a -f -q $Logfile
2 修改/etc/profile
vi /etc/profile
/usr/local/proxy/proxy
3,
tail -f /var/log/myaudit/
阅读(1595) | 评论(0) | 转发(0) |