November 26, 2008

Pipe your log through a socket

The idea behind this hack is to log a syslog event, send to a fifo extension pipe, and through the use of socket client, send it to a server listening on a specific port. I decided to write my “log notification” server in C#, actually it was destined for a Windows machine, so I though “why not” :) So here it goes, in C# [sourcecode language=‘c#’] using System; using System.Collections.Generic; using System. ... Read more

November 5, 2008

Wrap your shell commands

One of the most annoying matter I have met when administrating a server was following and fixing messes other users (who happen to have root password) would do on the server. Random users with root passwords often know two things… “sh” and “history -c”… and of course “I didn’t do it”. Now, while it is important to keep logs of activities on the server, it is even better to be able to pull up logs of every single commands entered plus their arguments. ... Read more