[Gllug] Monitoring a user session

Philip Hands phil at hands.com
Tue Oct 12 07:11:49 UTC 2010


On Mon, 11 Oct 2010 18:53:38 +0100, James Courtier-Dutton <james.dutton at gmail.com> wrote:
> What do people recommend?

These days I'd probably just run script, and then screen in multi-user
mode.  I'd imagine that if you run screen -x in their profile, it'll
fail and kick them out unless you're already in the screen session.

If you wanted to do anything more clever than that (like stopping them
From typing particular commands, say) then a good place to start would
be kibitz:

  http://www.tcl.tk/man/expect5.31/kibitz.1.html

which is a script written in expect (a TCL based language that makes
pattern matching and plumbing processes together rather easy if you can
look at TCL without your eyes bleeding, which I no longer can ;-)

If you prefer perl, there is an Expect.pm module in CPAN and someone has
ported kibitz to it:

  http://search.cpan.org/~rgiersig/Expect-1.15/Expect.pod#CONTRIBUTIONS

Expect is capable of doing a lot more than that -- anyone that's not
heard of it, and finds themselves plumbing processes and/or users on
terminal sessions together in complicated ways, should take a look.

Cheers, Phil.
-- 
|)|  Philip Hands [+44 (0)20 8530 9560]    http://www.hands.com/
|-|  HANDS.COM Ltd.                    http://www.uk.debian.org/
|(|  10 Onslow Gardens, South Woodford, London  E18 1NE  ENGLAND
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 851 bytes
Desc: not available
URL: <http://mailman.lug.org.uk/pipermail/gllug/attachments/20101012/c3512fc5/attachment.pgp>
-------------- next part --------------
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug


More information about the GLLUG mailing list