Skip to content

Commit 9055dcc

Browse files
Kabuki94claude
andcommitted
mios.toml [auth]: default to password_policy=plain password=mios
Operator 2026-05-10 verified live: Cockpit login at https://localhost:9090/ rejected `mios / mios` even though the dashboard advertises exactly those credentials. Root cause traced to the overlay step's chpasswd having inlined "mios:mios" rather than resolving from the toml -- which on prior installs led to silent mismatches (CRLF leaks, stale hashes from earlier runs, etc.) without any verification. This commit declares mios.toml as the SSOT for the dev VM password. Pairs with build-mios.ps1 in mios-bootstrap which: * reads [auth].password via the placeholder __MIOS_LOGIN_PASSWORD__ * substitutes it into the overlay heredoc BEFORE bash-side eval * verifies the resulting /etc/shadow entry via a pty-driven `su - mios` so a silent failure surfaces as a build warning Default is "mios" so the dashboard's "login: mios / mios" works as advertised. Operator picks a stronger password via mios.html -> [auth].password -> next overlay pass writes /etc/shadow accordingly. The mios.toml [auth] comment block documents the four policy modes (plain / hashed / interactive / none). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 569b567 commit 9055dcc

1 file changed

Lines changed: 21 additions & 6 deletions

File tree

usr/share/mios/mios.toml

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,18 +51,33 @@ language = "en_US.UTF-8"
5151
# ----------------------------------------------------------------------------
5252
# [auth] -- credential and SSH key policy.
5353
# ssh_key_action: generate | existing | skip
54-
# password_policy: interactive | hashed | none
55-
# - interactive : prompt at install (recommended)
56-
# - hashed : use the literal hash in password_hash (openssl passwd -6)
54+
# password_policy: interactive | hashed | plain | none
55+
# - interactive : prompt at install (recommended for hardened deploys)
56+
# - hashed : use the literal hash in password_hash (openssl passwd -y)
57+
# - plain : use the literal string in password (chpasswd hashes it)
5758
# - none : no password set; useful for kiosk / CI builds
58-
# All secret fields stay empty in any tracked copy of this file.
59+
#
60+
# Dev VM default is "plain" with password="mios" so Cockpit web at
61+
# https://localhost:9090/ accepts the operator-typed `mios / mios`
62+
# the dashboard advertises. Operator-overridable via mios.html. The
63+
# build-mios.ps1 Invoke-MiosQuadletOverlay step reads this section
64+
# and runs `chpasswd` accordingly inside the dev VM.
65+
#
66+
# Secret fields (password / password_hash / luks_passphrase / github_pat)
67+
# stay empty in any tracked copy of THIS file when password_policy is
68+
# 'interactive' or 'hashed' (the installer prompts and writes them to
69+
# a mode-0600 file outside this profile). For the 'plain' / 'none'
70+
# vendor-default cases, leaving 'password' set here is intentional --
71+
# the dev VM is single-tenant on Windows and the trust boundary is
72+
# the host login, not the VM password.
5973
# ----------------------------------------------------------------------------
6074
[auth]
6175
ssh_key_type = "ed25519"
6276
ssh_key_action = "generate"
6377
existing_ssh_key = ""
64-
password_policy = "interactive"
65-
password_hash = "" # never tracked; bootstrap writes mode-0600
78+
password_policy = "plain"
79+
password = "mios" # SSOT: dashboard advertises this; cockpit PAM uses it
80+
password_hash = "" # only when password_policy = "hashed"
6681
luks_passphrase = "" # never tracked; FHS installer + LUKS only
6782
github_pat = "" # never tracked; configures git credential helper
6883

0 commit comments

Comments
 (0)