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: Thomas Köhler
Subject: Re: trouble with ttys in log
Date: Mon, 6 Sep 2004 07:10:37 +0200
User-agent: Mutt/1.5.4i

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

-- 
 Thomas Köhler       Email:       address@hidden
     <><             WWW:              http://gott-gehabt.de
                     IRC:                           tkoehler
                     PGP public key available from Homepage!

Attachment: signature.asc
Description: Digital signature


reply via email to

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