Separate root history files

With the code below put in a kshrc file, each admin that su's into root will have their own root's history file.

This Content Component encountered an error
When there are multiple administrators to a system, it's very difficult to determine which admin made changes when the root's history file is the same no matter which user su'd to root. With the code below put in a kshrc file, each admin that su's into root will have their own root's history file.
Tty=$(tty|cut -f3-4 -d/)
Per=`last |grep $Tty |head -1 | awk '{ print $1 }' |cut -c 1-5`
HISTFILE=/var/spool/mail/.sh_hist.$Per
This was first published in January 2003

Dig deeper on Alternative OS security: Mac, Linux, Unix, etc.

Pro+

Features

Enjoy the benefits of Pro+ membership, learn more and join.

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchCloudSecurity

SearchNetworking

SearchCIO

SearchConsumerization

SearchEnterpriseDesktop

SearchCloudComputing

ComputerWeekly

Close