Sysadmin

“This. Is. My. BROOMSTICK!”


#!/bin/bash
cd deferred
find . -type f | split
for i in xa*; do
    for j in $(cat $i); do
        echo -n “$j ” #literal tab
        postcat $j | awk ‘
            /^From: / {f=$0}
            /^To: / {t=$0}
            /^Subject: / {s=$0}
            END {printf(“%s\t%s\t%s\n”,f,t,s)}’
    done >> /tmp/jfoo
done

Open in Excel, sort to taste, cleanup as needed, save for later use...

NFSing a Leopard user


Saved for future reference, since I don’t do it very often…

  1. From another admin account, open System Preferences, click Accounts.
  2. Control-click the username, select Advanced Options.
  3. Change the UID and optionally the GID.
  4. From a root shell, chown -R the user's files.
  5. If you changed the GID, run:
    dseditgroup -o edit -a $USER -t user $OLDGROUP
  6. If you want to add more local groups to match your NFS server, run:
    dseditgroup -o create -r $DESC -i $GID $GROUP

Wimps


Over on slashdot, someone quotes:

"The study also found that over a third have suffered from sleepless nights or headaches as a result of IT problems at work, while 59 per cent spend between one and 10 hours a week working on IT systems outside normal hours...."

In the modern vernacular, I say “It’s fine, learn to play, noob”.

“Why, when I was a boy, we had to walk to the server room through three feet of snow, uphill both ways! Now get off my lawn!”

When is data not data?


When it follows a commented-out line that ends in a backslash.

[this tip brought to you by OpenBSD’s ipsec.conf file, which considers the remaining partial record syntactically valid, triggering no warnings]

Back on the air!


Gosh, I wonder if the power outage at my co-lo had anything to do with the guy who was wiring up a dozen new PDUs…

Powered by Amazon S3


I’ve been thinking of redoing my domains to cut down on hosting costs and bandwidth, and my back-of-the-envelope calculations for Amazon’s S3 storage service look pretty good. So, I’ve just moved my Japan vacation pictures and thumbnails over, and I’ll see what sort of bill it produces this month.

This has the side-effect of making my currently-photo-heavy site load a lot faster for everyone.

“Wow, the new network’s fast!”


Shame we have to let the users move into the building tomorrow morning.

Network Autofellatio


How did I spend the last two days? Discovering that a machine that was powered off was sending a two megabit/second stream of SMTP traffic out through our firewall to another machine that had been powered off four days earlier, and that would have been on the far side of a VPN even if it had been turned on. And the VPN configuration had been removed from the firewall, which by this point was a completely different machine (hardware and OS) from the one that had been there four days earlier.