SNARE (and other cool stuff)

At the security class yesterday, one of the speakers mentioned some nifty free or free for non-commercial use apps that I thought we could use, either at Hoopeston or even Housing. After fighting these damn viruses all last night, I finally got around to googling for a few of the cooler things, and I found a few extra:

  • SNARE – a eventlog redirector/collector for windows/linux
  • Cacti – graphical frontend for RRDtool to simulate MRTG
  • Tripwire – been there, need to again.
  • Kiwi – Lots of windows utils: syslogd, serial port to syslog ‘repeater’, syslog event creator, etc

And so my blog descends into the depths of glorified link collector.

MSSql database access from Linux?

Oh yeah, it’s possible. Heres how:

  1. Install FreeTDS.
    emerge freetds on Gentoo.
  2. Edit /etc/freetds.conf (or wherever in got dropped) to include something like:
    [yourservername]
      host = your.microsoftsql.com
      port = 1433
      tds version = 7.0
    

    (more info)

  3. Try a command line sql query with tsql
  4. Install DBD::Sybase using the freetds instructions. On gentoo you can try the /usr/bin/g-cpan.pl perl script.
  5. Try some of the sample code to test with.

Now you’ve got access to your Windows SQL database on Linux. KICK ASS!

*BSD vs Linux

I’ve been thinking about trying out one of the BSD family of Unices for a while, and this rant got posted to slashdot. It’s an introduction to BSD for the linux user, exactly what I need.

After reading it, I see many parallels between the BSD ports tree and Gentoo‘s portage. I also realize he’s got a valid point about the “quick hack now” and “elegant solution later” camps. Speaking from years of “quick hack now” work, they never go away.

Maybe after I get some of the more pressing projects out of the way. Like getting rid of the RedHat 7.2 boxes I’ve still got out there.

New genkernel

gentoo unmasked the newest version of genkernel today. Normally, I’m all for forward progress, but this one has some silly dependencies:
Calculating dependencies ...done!
[ebuild N ] media-libs/freetype-2.1.4 -doc +zlib -bindist
[ebuild N ] media-libs/lcms-1.11 -tiff +jpeg +zlib +python
[ebuild N ] media-libs/libmng-1.0.4
[ebuild N ] media-gfx/bootsplash-0.6-r3
[ebuild U ] sys-kernel/genkernel-3.0.1_beta4 [1.8]

I’m not all that interested in the whiz-bang feature of a boot splash (like the livecd), so I’m not going to install this. The side effect is that emerge -uv world does me little good now. But thats the great thing about portage, I can fix it.

Add an /etc/portage/package.mask of

>=sys-kernel/genkernel-3.0

and voila, I’m staying on genkernel-1.8.

Spiff-tastic.

tar pipe

No, not tar from a cigarette! tar as in the *nix Tape ARchive.

I needed to back up my test gentoo box at home so I could install RedHat Enterprise Linux 3 AS. Since I needed to repartition, the best way was to haul a tar file off to another computer, using ssh and a tar pipe, like so:

tar cf - * | ssh hostname "cat > /my/tar/directory/tarfile.tar"

About 20 minutes later, and I’ve got a 1.4 Gb tarball on my other linux box. Not quite sure how I’m going to get it BACK to the test box, but I’m sure I’ll find something.

Or even better:
tar cvf - /mnt/gentoo/* |ssh root@target 'cd /; tar -xpf -'

Local Kernel ‘sploit

Nasty local linux kernel exploit based on some bad bounds checking in the kernel.

*UPDATE*: just emerge -uvp world, new gentoo-sources has been released.

To fix a gentoo box already running the latest kernel, you need to unmerge and re-emerge gentoo-sources:
mv /usr/src/linux/.config /usr/src
emerge --unmerge gentoo-sources
rm -r /usr/src/linux-2.4.20-gentoo-r8
rm /usr/src/linux
emerge gentoo-sources
mv /usr/src/.config /usr/src/linux/
cd /usr/src/linux
make dep && make clean && make bzImage
mount /boot
mv /usr/src/linux/arc/i368/boot/bzImage /boot
umount /boot

(Stolen from a forum post)

RedHat users should see the relevant errata.

tar anyone?

I’ve got 2 nearly identical dell poweredge 2200 servers, both of which I’m getting up and going with gentoo.

One, I got up and going last week. The other, I started on today. After reading some forum posts, I decided to try tar‘ing up the existing one and moving it over to the new machine.

About an hour (and 750 MBs) later, I ran grub, installed on the boot sector and rebooted. Working, optimized, up to date install in record time.

On source:
tar --exclude='/proc/*' --exclude='/dev/*' -cvf /tmp/image.tar /
On target:
scp user@source:/tmp/image.tar /tmp/
cd /
tar -xvpf /tmp/image.tar

So nifty.