Reconsidering network authentication delays

If you use ssh to connect to a machine and mistype your password,you'll probably have to sit through a couple of seconds of delaybefore you can try again. In theory this delay is supposed to slowdown large-scale password guessing attempts. In practice it'spointless, as anyone who is getting mass-ssh-probed can attest.

Delaying after failed login attempts started in the world of physicalterminals, where it works because the supply of physical terminals youcan try to log in on is


Scripting and automation capture knowledge

NewsForge has been running a series ofarticles by Brian Warshawsky on the 'Ten Commandments of systemadministration'. His tenth commandment is 'Thou shalt not waste timedoing repetitive and mundane tasks' (article here ,with links to the other nine), where he tells people to automate suchtasks through shell scripts.

There's a number of good reasons to follow this advice; for a start,writing shell scripts is probably less boring than doing these mundanetasks over and over. But there's a slightly


Dangerously over-broad error catching

One of the stock pieces of advice about writing Python code is thatbasic error checks should be handled by catching the exception thattrying to do the operation generates, instead of through explicitchecks beforehand. For example, if you are getting the value for a keyfrom a dictionary (what some other languages call a hash), you don'tbother checking to see if the key is in the dictionary beforehand; youjust try to get the value.

This code might be written like this (especially in examples)


Some quick CBL stats

Last night I shuffled our antispam rules to put checking the CBL before everything, including our per-IP-address greylisting.

Since 3:20am this morning, 83% of the connect-time SMTP rejectionswere due to the CBL, for 88% of the IP addresses (4,180 out of 5,000rejections from 3,038 different IP addresses out of 3,455).

So the simple recommendation seems to be: if you can


Some spam stats at June 25th, 2005

Another Saturday, another set of spam statistics. This week I stoppedputting in IP-level blocks for high-rate connection sources so that Icould gather more accurate statistics on the various DNS blocklists thatwe use here.

Most of the statistics are from about 3:20 am Sunday the 19th, whenlogs rolled over; some are from about 6:10 am that Sunday, when thesystem rebooted. (Note that many figures are somewhat rounded off.)

The basic statistics are stark:


An open letter to free webmail providers

Dear free webmail providers: I have a simple request for you that willhelp the spam problem. Please stop allowing people to send out mailthrough your systems from IP addresses that are well known as heavyspam sources , especially of things such as advance fee fraud.

I got yet another '419' advance fee fraud spam today, sent through afree webmail provider. Selected headers are:

Received: from dbmail-mx1.orcon.net.nz ([219.88.2

An unchanging system should be stable

One of my principles of system administration is an unchanging systemshould be stable . Stable means more than 'doesn't crash', it means'doesn't need to be fiddled with all the time'; no hand-holding, nocleaning up afterwards. It means a system that can be left to runquietly in the corner.

This does mean that you have to make it so that ordinary things can'tcause the system to explode. The two big ones are making sure thatsystem logs don


A real use for staticmethod

In Python, all method functions normally get called with the object astheir first argument. New-style classes can specify that some methodsshould instead be 'static' methods: they don't receive the object asone of their arguments.

On the face of it this is a bit peculiar. Given that Python hasordinary (module-level) functions, why would you ever want to design astaticmethod instead (apart from misplaced object-oriented purity)?

What I use static methods for is as a way


Future Sysadmin Jobs

I am fond of giving everyone who tells me they're thinking of beingsystem administrators a rant disguised as a question:

When things are automated in the future, there are going to be threesysadmin jobs left: the secretary filling in forms, the stock clerkswapping the backup tapes and refilling the printer paper, and thetroubleshooter they call in when there's problems. Which one do youwant to be?

I firmly believe that all routine system administration will beautomated sooner or later (yes, despite vendors


The problems with enforced UTF-8 only filenames

Last week, one of the Linux kernel mailing list's perennial issuesresurfaced: the great filename character set issue, where people debatewhat (if anything) the Linux kernel should do about what character set(or character sets) filenames are in, how the kernel can insure thateveryone sees the same filename, and so on.

As usual, someone suggested that the Linux kernel should require thatLinux filenames are all valid UTF-8 strings. This is a superficiallyattractive idea; applications would always know what to