
centos记录所有登陆用户的IP操作日志
将以下代码添加到/etc/profile文件底部 history USER=`whoami` USER_IP=`who -u am i 2>/dev/null| awk '{print $NF}'|sed -e 's/[()]//g'...
将以下代码添加到/etc/profile文件底部 history USER=`whoami` USER_IP=`who -u am i 2>/dev/null| awk '{print $NF}'|sed -e 's/[()]//g'...