Log user activity, add below lines to .bash_profile
For system wide, add to /etc/skel/.bash_profile
#----SCRIPTING START---
if [ -d ~/.audit ]
then
        echo ""
else
        echo "Creating audit directory"
        mkdir ~/.audit
fi
echo "Scripting session..."
script ~/.audit/scriptlog_$USER.`date +%Y%m%d%H%M%S`
#----SCRIPTING END---
 
 
No comments:
Post a Comment