Root shell with logging

oliver.fenker at bayerbbs.com oliver.fenker at bayerbbs.com
Thu Apr 26 06:01:21 UTC 2007


Hello,

thank you all for the advices. I will have a closer look at these now.

BTW: I found another quite nice hack. Just source it in your shell session 
and all commands are logged

function dlog
{
        typeset -i stat=$?
        typeset x
        x=$(fc -ln -0)
        logger -p daemon.notice -t "/bin/sh $LOGNAME $$" Status $stat PWD 
$PWD \'${x#       }\'
}
trap dlog DEBUG

Cheers,
Oliver



More information about the redhat-list mailing list