Skip to content

fix(login): keep a disk a token opens from logging its only account in - #9

Merged
lbssousa merged 1 commit into
mainfrom
fix/tpm2-no-autologin
Nov 5, 2026
Merged

lbssousa merged 1 commit into
mainfrom
fix/tpm2-no-autologin

Conversation

@lbssousa

@lbssousa lbssousa commented Nov 5, 2026

Copy link
Copy Markdown
Owner

Summary

With one account on an encrypted disk, omarchy-mu-login-select logged it in whatever opened the disk. A TPM2 token opens the disk with nobody typing a password, so the machine started into an open desktop.

A disk whose LUKS header has a token (TPM2, FIDO2, clevis) now needs the same thing several accounts already did: the boot image's record of the key slot a typed password opened, mapped to that account. Without it, the login screen shows. A header that can't be read counts as having a token.

With sd-encrypt, which TPM2 unlocking needs, the boot image's cryptsetup wrapper isn't there, so such a machine always shows the login screen after boot, even when the password was typed at the fallback prompt.

Testing

  • just test passes. shellcheck isn't installed here, so CI covers it.
  • New tests use a real LUKS header with the tokens systemd-cryptenroll and clevis write. Without the fix, the one-account test fails.
  • Not exercised: a machine with a real TPM2 token.

🤖 Generated with Claude Code

With one account on an encrypted disk, omarchy-mu-login-select logged it in
whatever opened the disk. A TPM2 token opens it with nobody typing a password,
so the machine started into an open desktop. A token in the LUKS header (TPM2,
FIDO2, clevis), or a header that can't be read, now asks for the same record of
a typed password's slot that several accounts need, and the login screen shows
without it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@lbssousa
lbssousa merged commit d55a5a4 into main Nov 5, 2026
1 check passed
@lbssousa lbssousa mentioned this pull request Nov 5, 2026
1 of 2 tasks
@lbssousa
lbssousa deleted the fix/tpm2-no-autologin branch November 5, 2026 18:58
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