[Gllug] Shutdown Stopped

Walid Shaari walid at melinux.com
Sat Oct 19 09:55:35 UTC 2002


On Sat, 2002-10-19 at 00:00, Dean Wilson wrote:
> After watching someone press ctrl-alt-delete on one of our Linux test
> servers[0] in work i've decided to become a bit more proactive with my
> alertness for larting chances. I've put an entry in /etc/inittab that calls
> a small custom script that writes out a log entry to a file (and to syslog
> via logger) when ever the three finger salute is kicked off.
> 
> A feature i'd like to add but i'm not too sure about how to do is to grab
> the user name of the culprit. I tried getting it from $HOME but this gets
> changed to '/' when the command is executed due to it changing uid to root
> (I assume). Anyone have any suggestions on how to do this?

In python2.2 it is in the standard library os module, os.getlogin() as
opposed to os.geteuid(),I am sure there is something similar in perl
even if its written using cryptic symbols like $:-(
 

Walid


-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list