Skip to content

fix(image): drop the expired password from the cloud image - #55

Merged
passcod merged 3 commits into
mainfrom
cloud-no-expired-password
Jul 31, 2026
Merged

fix(image): drop the expired password from the cloud image#55
passcod merged 3 commits into
mainfrom
cloud-no-expired-password

Conversation

@passcod

@passcod passcod commented Jul 31, 2026

Copy link
Copy Markdown
Member

🤖 The cloud image shipped the ubuntu account with password bes marked expired. An expired password makes PAM demand a change on every session, not just console logins — key-authenticated SSH and Tailscale SSH sessions open straight into "You are required to change your password immediately", and when that change cannot complete the session is closed, leaving no way in. Deployed AMI instances hit this.

Cloud instances get their credentials from cloud-init, so the cloud image now ships no usable password at all (matching stock Ubuntu cloud images) and no expiry. Metal and Pi keep bes plus the expiry, since there the pre-set credential is the intended console login and must be changed.

That removes serial-console login on cloud instances, so the second commit documents rd.break as the break-glass path. The recipes there use only tools that are actually present in the dracut initramfs (checked against a built image: sh, mount, sed, grep, cat, systemctl, but no chroot, passwd, chage or date), and note that systemd.unit=emergency.target is not an alternative because root has no password and /sbin/nologin as its shell.

The new structure-test assertions were run against a previously built cloud image and fail exactly as intended on the pre-fix state. The fix itself has not yet been confirmed against a freshly built image.

The cloud image shipped the ubuntu account with password bes marked
expired. An expired password makes PAM demand a change on every session,
not just console logins: key-authenticated SSH and Tailscale SSH sessions
open straight into "You are required to change your password
immediately", and when that change cannot complete the session is closed,
leaving no way in.

Cloud instances get their credentials from cloud-init, so the cloud image
now ships no usable password at all (matching stock Ubuntu cloud images)
and no expiry. Metal and Pi keep bes plus the expiry, since there the
pre-set credential is the intended console login and must be changed.

Note that this removes serial-console login on cloud instances; break-glass
is now via cloud-init user-data or the volume.
@passcod
passcod force-pushed the cloud-no-expired-password branch from 1a7c295 to 7a52177 Compare July 31, 2026 04:47
passcod added 2 commits July 31, 2026 16:56
The cloud image no longer ships a password, so an operator with only
console access needs a documented way back in. Also records why
init=/bin/sh and emergency.target do not work on these images.
Unrelated to the rest of this branch, but it blocks CI: the toolchain
bump extended useless_borrows_in_formatting, and main has not been built
since.
@passcod
passcod force-pushed the cloud-no-expired-password branch from 87cb89e to 5349d73 Compare July 31, 2026 04:56
@passcod
passcod enabled auto-merge July 31, 2026 05:01
@passcod
passcod merged commit f3b0451 into main Jul 31, 2026
38 checks passed
@passcod
passcod deleted the cloud-no-expired-password branch July 31, 2026 05:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant