The problem with script is that it captures output as well, which is
unnecessary, I've also not found a way to automatically and silently
run it each time a terminal is fired up. Oh, and when I started using
the bash snippet I posted, I didn't know about script.

What I posted captures only the commands run. Great for when you say
"gee, what was that 12 pipe long command I ran three weeks ago to do
that thing?" or "it's 3am and this server just broke, who ran what
recently so I can undo it and go back to bed?".

Definitely not meant for auditing in the legal sense, nor would I
recommend it for such purposes. Great for keeping an external memory of
how you accomplished things or for playing the (non-legal) blame game
when necessary.

On Thu, 2015-10-29 at 22:31 -0600, Yves Dorfsman wrote:
> On 2015-10-29 12:54, Ryan DeShone wrote:
> > I agree... but back to the original topic. If you just want a log
> > of 
> > everything you do, I use the following hack to keep an eternal log
> > of 
> > commands run in bash.
> > 
> > https://gist.github.com/ardichoke/038c84b7966856da211a
> > 
> > Used it in the past when I was administering hosts that were worked
> > on by
> > multiple people. This would help in tracking down who broke things
> 
> 
> If all you want is a log, there's always "script".
> 
> If what you're after is auditing (not in the legal sense, let's not
> start
> that discussion again) you can use "sudosh".
> 
> 
_______________________________________________
Tech mailing list
[email protected]
https://lists.lopsa.org/cgi-bin/mailman/listinfo/tech
This list provided by the League of Professional System Administrators
 http://lopsa.org/

Reply via email to