How Unix didn't used to support '#!', a brief history

When I wrote about why an empty executable file is true in Unix , I mentioned that it's traditional Unix behaviorthat shell scripts without a '#!' line are passed directly to theBourne shell. The short version of why this behavior exists is thatbefore a certain point, Unix didn't understand '#!' lines at all.

In V7 (and versions before it), the exec*() family of systemcalls only worked on actual binary executables. In order to makeshell


Getting the names of your Linux software RAID devices to stick

Suppose that you added some disks to a server and then used themto create a software RAID mirror called 'md2', like so:

mdadm -C /dev/md2 -n 2 -l raid1 -b internal /dev/sde1 /dev/sdf1

(Having an internal bitmap may be the default these days, I haven'tchecked.)

Everything goes great, the software RAID finishes resyncing(eventually), you reboot, and suddenly your system has a '/dev


It feels surprisingly good to block Bingbot from my blog front page

Back last year I wrote about how Microsoft's Bingbot relentlesslycrawled the front page of Wandering Thoughts .On pretty much every day, a single Bingbot IP would request the frontpage of Wandering Thoughts a thousand times or more. Backin that entry I said I was tempted to block Bingbot from doing that;recently, my vague irritation with Bingbot's ongoing behavior reacheda boiling point, and I actually did that.

Since Wandering Thoughts is served through an Apache withmod_rewrite enabled, the block was relatively


My distrust of multi-factor authentication's account recovery story

A bunch of third party websites really want you to use multi-factorauthentication these days. Some of them aren't giving some peoplea choice about it; for example, PyPI recently mandated MFA forsufficiently popular projects .I have decidedly mixed feelings about this in general, and I'verealized that one reason for them is that I don't trust the someof the potential failure modes of multi-factor authentication.Specifically, the ones related to 'account recovery', also knownas what happens


The Linux load average does mean something (although maybe not much)

One of the things you'll hear about monitoring your systems is thatthe load average is not really a metric that you should pay attentionto, and so perhaps things like an IMAP server with an elevatedload average or a login serverwith periodic load spikes are not worthcaring about. There is something to be said for this, and I'vecome to think that load average is a secondary indicator , but I also think that theLinux load average can still tell you things that matter.

The first thing


Larger backup systems often operate in multiple stages

At the small scale, backups are usually straightforward (althoughnot always simple). As you get into larger and more complicatedenvironments, like ours , thingscan get more tangled. One of the ways that backup systems can dothis is that they often operate in stages, or if you prefer phases,where different sorts of things happen in different stages.

As a concrete example, Amanda normallyoperates in two overlapping stages. First, Amanda makes the actualbackups from your various systems and streams them onto one or more


DKIM signature types (algorithms) that we see (as of July 2022)

A lot of email these days is signed with DKIM , partlybecause signing email with DKIM is increasingly mandatory inpractice . But 'signed with DKIM' is abroad category because DKIM has more than one signing algorithm andon top of that is used with (public) keys of different lengths.

What signing algorithms DKIM supports in practice is a matter forsome discussion. The initial DKIM RFCs, such as RFC 6376 , supportrsa-sha1 and rsa-sha256. RFC 83


My current mixed views on the Linux kernel netconsole

The Linux kernel's netconsole allowsyou to "log kernel printk messages over UDP" to a remote system;this makes it another form of kernel (message) console , alongside the video console and serialconsole. I've looked into netconsole periodically and played withit a bit, and the whole experience has left me with decidedly mixedfeelings and very little desire to actually use it in our environment.

The first problem with netconsole in practice is that the story onthe receiving side is what you could politely call


A surprise: you can only have one Linux kernel serial console

One of Linux's nice features is that not only does it support serial consoles , but you can have theconventional video console too. This is important for us because often we want to use the video console . The video console is wherewe usually interact with the system in person, while the serialconsole goes to our console server for logging.

(Logging in over the serial console remains somewhat useful if thesystem's networking isn't working for some reason, and systemdmakes it easy .)

However


Why an empty (executable) file is generally true in Unix

Among a certain segment of Unix people, a famous bit of trivia isthat /bin/true used to be an empty file until people complicatedit ( via , which remindedme of this). However, you might wonder why an empty executable filewould be true. This more or less follows from a variety of standardand traditional behaviors, like this:

  1. If a shell script ends without an explicit ' exit 'command, its exit status is the exit status of the last commandrun in the