[sudo-users] I need help with sudoers..

Russell Van Tassell russell+sudo-users at loosenut.com
Tue Jan 27 17:31:32 EST 2009


On Tue, Jan 27, 2009 at 05:18:28PM -0500, Pidugu Vijaya wrote:
> That is exactly what I said... Thanks again..
> Someone posed a bash shell that actually logs.. I cannot trace that email anymore...
> 
> Does anyone remember what that is?

Some folks seem to claim you can just add something to /etc/profile to
have it log to syslog... Personally, I'm not really a bash shell fan,
so...  YMMV.

    function history_to_syslog
    {
    declare cmd
    cmd=$(fc -ln -0)
    logger -p local7.notice . SESSION = $$, CMD =$cmd
    }
    trap history_to_syslog DEBUG


References:
  http://posludio.wordpress.com/2007/11/02/bash-history-to-a-remote-syslog/
  http://blog.cosmicegg.net/2008/09/sending-shell-commands-to-syslog.html


-- 
Russell M. Van Tassell
russell at loosenut.com

Checkuary, n.:
       The thirteenth month of the year.  Begins New Year's Day and ends
  when a person stops absentmindedly writing the old year on his checks.



More information about the sudo-users mailing list