Task: change the hostname of one of my home servers from box2 to nas. Ten minutes, I said.
Where it went:
hostnamectl set-hostname nas. Done. (So far, so good.)/etc/hostsstill had the old name pointing at127.0.1.1. Fixed that.- The router had a DHCP reservation with the old name, so other machines still resolved
box2. Updated. - mDNS (
.local) was caching the old name on three laptops. Waited. Flushed. - The TLS certificate for the internal web interface lists
box2in its subject alternative names. Browsers complain. Need to issue a new one, which needs the renewal tool, which needs the newer Python, which... you know. - Backup jobs reference the old name in about fourteen places, and one of them is in a systemd unit I wrote in 2021 and do not remember.
Day four. The hostname is correct. Everything else is vibes.
Is there a sane way to find every place a name is used? grep -r box2 /etc only goes so far.