PaulDotCom mailing list archives

Re: A logging root shell


From: Geordy Rostad <geordy () hotmail com>
Date: Tue, 22 Nov 2011 09:44:50 -0800

Hi Nils,

Up at Linux Fest Northwest I saw a presentation by a guy who attacked this problem with a couple of scripts.  I believe 
the most simple one was something to this effect but I only jotted it down and didn't actually test it:


function log

{

typeset x

x=$(history 1 | cut -f 5-)

logger -p daemon.notice -t "LOGINAME" $PWD "${x#        }"

}

trap log DEBUG


The presenter's name was Gary Smith.  I don't remember him being a security guy as much as a ninja sys admin.

-geordy
_______________________________________________
Pauldotcom mailing list
Pauldotcom () mail pauldotcom com
http://mail.pauldotcom.com/cgi-bin/mailman/listinfo/pauldotcom
Main Web Site: http://pauldotcom.com

Current thread: