From 3efdb5c94b021402eb92379a47f9a41b0eaee001 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Tue, 28 Jul 2026 08:43:22 -0700 Subject: [PATCH] Reject reserved system usernames in the configurator MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The username regex accepted names that already exist on the target, so useradd failed inside arch_install_system — after the disk had been partitioned and formatted, which is the worst point to discover it. From #59 by @wolfgangw, applied to quattro; it was opened against main. Co-Authored-By: Wolfgang Woehl Co-Authored-By: Claude Opus 5 (1M context) --- configs/airootfs/root/configurator | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/configs/airootfs/root/configurator b/configs/airootfs/root/configurator index 13f6a91..5b67e24 100644 --- a/configs/airootfs/root/configurator +++ b/configs/airootfs/root/configurator @@ -145,7 +145,11 @@ user_form() { username=$(gum input --placeholder "Alphanumeric without spaces (like dhh)" --prompt.foreground="#845DF9" --prompt "Username> ") || abort if [[ "$username" =~ ^[a-z_][a-z0-9_-]*[$]?$ ]]; then - break + if [[ "$username" =~ ^(root|bin|daemon|mail|ftp|http|nobody|dbus|systemd-coredump|systemd-network|systemd-oom|systemd-journal-remote|systemd-resolve|systemd-timesync|tss|uuidd|alpm|git|avahi|cups|lp|_talkd|polkitd|rtkit|qemu|brltty|gluster|rpc|libvirt-qemu|pcscd|nvidia-persistenced|sddm)$ ]] ; then + notice "Username is reserved for system" 1 + else + break + fi else notice "Username must be alphanumeric with no spaces" 1 fi