Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 23 Nov 2002 03:05:33 +0100
From:      Olivier <olinether@studyssimo.be>
To:        Jimmy Olgeni <olgeni@uli.it>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: How to monitor user commands
Message-ID:  <20021123020533.GB38745@titanjr.blacktrap.net>
In-Reply-To: <20021121182954.V62985-100000@dev1.localdomain.net>
References:  <20021121155159.GA36762@titanjr.blacktrap.net> <20021121182954.V62985-100000@dev1.localdomain.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Nov 21, 2002 at 06:31:14PM +0100, Jimmy Olgeni wrote:
> 
> On Thu, 21 Nov 2002, Olivier wrote:
> 
> > Is there any tool in the ports that could do that? Or has anybody done
> > any script or something that would help me?
> 
> Check out the "script" command, which would allow you to log the users
> terminal sessions. The "watch" command allows you to watch the users
> in real time, while the csh shell should have some support for
> login/logout notification, even if I couldn't figure out how to enable
> it :o)
> 
> -- 
> jimmy

Thanks a lot jimmy and axel ;-)

* 'script' could do the job, I thought about putting something like 
    script -q "/tmp/logging/$USER.`date "+%d-%m-%Y.%H:%M:%S"`"
  in /etc/profile, so ok the user doesn't notice she's in a forked shell,
  until she needs to exit it. Then a double 'exit' is needed, so that will
  show her something is wrong, and nothing prevents from doing stuff after
  typing the first 'exit'..
  Is there a better way to do this with 'script'?

* 'watch' sounds very nice, but I need to be connected at the same time, thus
  need a reliable way to get notified about a bash login? 
  Or is it supposed to be used by launching a couple of watch processes, each
  snooping one of the ttyp's? That would work I guess, maybe piped into gzip.
  BTW, shouldn't the warn(8) man page warn that /dev/snpX devices needs to be
  MAKEDEV'd first? But it's probably just me, I am really skilled at missing
  important info in the doc ;-)

Thank you again for your help..

Olivier

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021123020533.GB38745>