feat(firstboot): force root + operator password on first boot (console gate) #139
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "force-root-password-on-first-boot"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
A first-boot password gate so the operator USB no longer ships with an
unprotected root account. New rc.d service
clawdie_firstboot_rootpw,ordered
REQUIRE: clawdie_live_gpu FILESYSTEMS/BEFORE: sddm colibri_daemon.On the text console (the operator is physically present at first boot) it shows a
15s countdown to engage. If engaged, it forces a root and operator
(clawdie) password — echo-off via
stty, applied withpw usermod -h 0whichreads the secret on stdin (never in argv/ps, never near the agent/LLM). It
prints "write both on paper — no recovery."
/var/db/colibri/.secured(/varpersists on this image —
varmfs="NO"). Present -> silent exit.re-prompts next boot, so an unattended/headless boot never hangs while an
attended boot is effectively forced.
Why this shape
Ordering the gate before
colibri_daemonmeans the security decision isalways made before any agent can autospawn /
node_register. That dissolvesthe boot-vs-login race natively — no cross-component interlock needed. The
.securedmarker is also the signal a later colibri change can read to label anunsecured node to mother (daemon-side; out of scope here).
This replaces the earlier GUI-dialog idea: no new package (yad/zenity), no
edit to the XFCE session path (no login-brick risk), FreeBSD-native (rc.d +
pw+stty, mirroring existingclawdie_live_gpuordering andclawdie-join-hive.sh'sstty -echo).Verification
tests/firstboot-rootpw-test.sh— 10/10: marker skip, password validation(empty/short/mismatch rejected), and that the password reaches
pw usermod root -h 0on stdin and never appears in argv.⚠ Boot-test before merge
The interactive bits —
read -tcountdown andsttyecho-off on/dev/consolein the rc phase — are FreeBSD/vt(4)-sensitive and must bebooted on osa/bhyve to confirm before merge. Everything else is verified.
Follow-ups (not in this PR)
--root-passwordbuild flag (writes the passwordplaintext into
build.cfgand never applies it)./var/db/colibri/.securedat daemon start and label anunsecured node to mother + reference it in the AGENTS.md nag.
🤖 Generated with Claude Code
Paired colibri-side work: colibri#183.
This PR's gate writes
/var/db/colibri/.securedand setscolibri_daemon_require_secured="YES"on the operator image, and the skip message now promises the agent will not start/register until secured. That promise is only true once colibri#183 lands (knob-guarded autospawn gate incolibri_daemon.in, defaulting OFF so deployed hosts are unaffected). Boot-test the two together on osa before merge.