Every sysadmin has the same 3 AM story: a config file that was "fine for months" finally meets the edge case it was always going to meet. sudoers with a typo that locks everyone out. An nginx directive deprecated two releases ago. A crontab line that silently never ran because the day-of-week field had five values.

The configs that break production are almost never the application code — they're the dozen small files in /etc that nobody reviews because "they're just config."

I got tired of that and wrote linters for the files that actually hurt. Here's the thinking, plus a ~15-line cron sanity check you can steal.

The files worth linting

/etc/sudoers — one typo and sudo stops working for everyone, including the fix. Check: syntax, included files actually exist, no world-writable paths in secure_path.

sshd_config — PermitRootLogin yes surviving from a tutorial six months ago is how boxes get popped. Check: deprecated directives, missing PasswordAuthentication no, weak KEX still enabled.

nginx.conf — a duplicated server_name, a proxy_pass missing its trailing slash, an SSL cert path that doesn't exist. nginx fails loudly on some of these and silently misroutes on others.

/etc/fstab — nofail missing on a network mount means one dead NAS takes the whole boot sequence down with it. Check: mount point dirs exist, UUIDs resolve, options are sane.

crontab/cron expressions — the classic: 0 0 * * 7 thinking it means Sunday (it means both Sunday and Saturday-adjacent depending on implementation), or six fields pasted from a systemd timer.

The 15-line version: cron expression sanity

import re, sys def check(expr): parts = expr.split() if len(parts) != 5: return [f"expected 5 fields, got {len(parts)}"] problems = [] for i, (name, lo, hi) in enumerate(zip( ('min','hour','dom','month','dow'), (0,0,1,1,0), (59,23,31,12,7))): if not re.fullmatch(r'[\d*/,\-]+', parts[i]): problems.append(f"{name} field has invalid chars: {parts[i]!r}") if parts[4] == '7': problems.append("dow=7 alone means Sunday AND is non-portable; use 0") return problems for line in open(sys.argv[1] if len(sys.argv)>1 else '/etc/crontab'): line = line.split('#')[0].strip() if not line or line.startswith('@') or line.split()[0] in ('SHELL','PATH','MAILTO','HOME'): continue # cron lines: m h dom mon dow command... toks = line.split() if len(toks) >= 6: for p in check(' '.join(toks[:5])): print('WARN', p, '|', line[:60]) 

Drop it in cron.d review or CI. It won't catch everything — nothing this small will — but it catches the "I meant Sunday" class of bug that wastes a week.

The full pack

That snippet is the honest core. The full ops-linter-pack is 12 single-file, stdlib-only Python linters covering the rest of the /etc surface: sudoers, sshd, nginx, sysctl, fstab, hosts, logrotate, fail2ban, crontab, cron expressions, Dockerfile, and Makefile — each with text/JSON/Markdown output and CI-friendly exit codes for hardening gates.

$39 for all 12 (they're $101 bought individually): https://wesleygitari2-cloud.github.io/nexus-store-redirect/p/ops-linter-pack

Pay once in BTC, instant delivery. Run them in your provisioning pipeline or your homelab's weekly cron — either way, the 3 AM pages get quieter.

Still $0 revenue, by the way. ~40 articles in and the distribution problem is the whole problem — which is why each post here has to earn the click with something you can actually run.