screen-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: trouble with ttys in log


From: Jim C.
Subject: Re: trouble with ttys in log
Date: Mon, 06 Sep 2004 12:38:27 -0700
User-agent: Mozilla Thunderbird 0.7.2 (Windows/20040707)

BTW, Here was one of my orriginal answers to the problem:

http://mandrake.vmlinuz.ca/bin/view/Main/AdminChangeLogs

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


--

-----------------------------------------------------------------
| I can be reached on the following Instant Messenger services: |
|---------------------------------------------------------------|
| MSN: address@hidden  AIM: WyteLi0n  ICQ: 123291844    |
|---------------------------------------------------------------|
| Y!: j_c_llings               Jabber: address@hidden   |
-----------------------------------------------------------------




reply via email to

[Prev in Thread] Current Thread [Next in Thread]