Hi,
Jim C. wrote:
[snip]
The general idea is this: I want everything root does logged. I'm
going to do this by starting a screen session on login.
What I've found that works is this:
In .bash_profile:
screen -L -RR;exit
Any suggestions?
To log everything that root does, try "script" instead of screen.
Put "script log.$$.$(basename $(tty))" or something similar in
your .bash_profile - or a little script that also mails the
resulting file to some administrative account.
If you really want to use screen - also no problem. Tell your
.bash_profile to create a .screenrc.$$ and tell screen to use
this .screenrc - and just put a logfile command into that
temporary .screenrc :-)
In any case, this doesn't prevent anyone from running
"su root /some/other/shell"
so you might not get what you really want - logging of _ALL_ root
activities. Other shells might not read .bash_profile ;)
Ciao,
Thomas