Consider the cronslave

As a nerdy, working-class kid who grew up in the 1990s, knowing what time it actually was was a luxury I rarely had access to before I was 12 or so and my parents finally got an Internet connection with its attendant link to the Network Time Protocol. If you had told me I could have not just a watch but an entire machine that Never lost the time, Did what I wanted, how I wanted it, and Could be programmed to do what I want, how I want it on a schedule, I would have had to substantially revise my Christmas wishlist. ...

May 30, 2025

LLMs make Perl great again

Perl 5 went through a long nadir of unpopularity due in large part to its deserved “Write Once, Read Never” reputation. So I was surprised to find out not only is it installed by default on Debian, it’s installed nearly everywhere by default. It’s even the non-shell scripting language of choice on OpenBSD! Perhaps the only thing more impressive than Perl’s utter ubiquity is its longevity. The latest major version of Perl was first released in 1994. It came into existence on this planet less than a year after I did. It’s even arguably more portable than the median shell script - different Unices might use Bash, Zsh, Ksh, or even something newfangled like Fish, but for the most part a Perl 5 program is a Perl 5 program is a Perl 5 program. ...

May 24, 2025

Common-sense security for SSH on a new Debian server

Last night I went to DigitalOcean and spun up a tiny new, $4/month droplet – on my own dime! It sounds crazy, but I’ve never actually wanted to pay for hosting myself before. But I have a fun little web app cooking up, one that might eventually pay that $4/month back with interests, and I decided, why not, it’s time to finally put some of my own skin in the game with this whole sysadmin thing. ...

September 24, 2024

What scripting languages come out of the box on Debian 12?

Poking around in a fresh VM in Vagrant, I see bash dash, a POSIX compliant shell linked under sh python3, 3.11.2 at the time of writing awk, specifically mawk sed, if you count that (I do) perl, specifically Perl 5 There may be others I missed. Why I’m curious: Knowing that a language is installed by default on the most popular Linux distribution can simplify certain concerns considerably, which are of special interest to people who don’t work on Internet-connected boxes. Knowing that Python/Perl is already on there means that, provided your script only relies on the standard library, you should be able to just scp it over in a pinch and have it “just work”. ...

June 23, 2024

One problem with user-scoped `systemd` timers

I’ve discovered one big downside of [putting systemd times into ~/.config/systemd/user/][1]: They stop running when you log out. Two ways around this problem: Bite the bullet, and install the timers into /etc/systemd/. This means giving up chezmoi version control, making the overall system more snowflake-y. I’m not crazy about it. Remote in with tmux, instead of ever logging out, just use C-b d to detach from the session. I’m going with #2. The lead developer of ktty is known not to like tmux, so there’s probably a way to detach long-running SSH sections inside of kitty itself – but I haven’t found it yet. Have you? ...

November 26, 2023

That damned Debian 10 one-liner I always need to let me `sudo`

1 2 # ⚠️: Reboots your VM. su -c "$(whereis adduser | awk '{print $2}') $(whoami) sudo && $(whereis reboot | awk '{print $2}')" In all its glory! For Debian 10 and up, because Debian 10 is where the sysv to systemd conversion became totalizing. Let’s break down quickly why each part of this is needed: Since we are trying to add ourselves to the sudo group right now, we obviously can’t use sudo. Enter su -c to switch to root, run a command, and then switch back out. whereis adduser instead of simply adduser because adduser is no longer in the $PATH by default anymore. Tempted to try which adduser? No dice – which only gets you things in the $PATH as well: 1 2 3 andrew@debian-10:~$ which adduser # zip, zilch, nada. andrew@debian-10:~$ whereis adduser adduser: /usr/sbin/adduser /etc/adduser.conf /usr/share/adduser /usr/share/man/man8/adduser.8.gz awk to rip out /usr/sbin/adduser, which - thankfully - at least is still executable. $(whoami) because your name might not be andrew! whereis reboot because I don’t want to have to manually remember to logout and login again.

November 20, 2023