Skip to content

Offer to change the login and root passwords with the system disk's - #14556

Draft
omarchybot wants to merge 4 commits into
omabot/pr-13362from
omabot/pr-14483
Draft

omarchybot wants to merge 4 commits into
omabot/pr-13362from
omabot/pr-14483

Conversation

@omarchybot

@omarchybot omarchybot commented Oct 8, 2026 •

Copy link
Copy Markdown
Collaborator

Setup gives the system disk, login user and root one password, but changing the disk password can leave them different. This offers an explicit choice to update the login and root passwords with the system disk password, defaulting to no. Data drives and root-only invocations change the disk alone; cancelling the question cancels the whole change.

With consent, accounts change only after the new disk key is verified, the old key is retired and the platform records the owner's new slot. An account failure retains the journal for retry without holding up Mac boot-slot recording. A retry that rolls the disk change back leaves distinct account passwords unchanged.

The journal contains no passwords. For an opted-in LUKS2 change it includes a checksum of public keyslot metadata, because LUKS2 can replace a key in the same slot. That distinguishes a completed in-place change from a rollback when resuming. Older ambiguous journals finish on the disk alone.

Stacked on #14431.

Supersedes #14483 by @maralcbr, whose commits this carries unchanged, with the fixes above on top.

maralcbr and others added 3 commits October 8, 2026 08:03
Installation gives the login user, root and the system disk one password,
and changing the disk's alone lets them drift apart. omarchy-drive-password
now asks, for the system disk only, whether the login and root passwords
should follow. The answer defaults to no, Ctrl-C cancels the whole change,
and nothing is asked without a login user or for any other drive.

With yes, the accounts change only after the new key opens the disk, the
old one no longer does, and the platform has recorded the owner's slot for
its boot checks, so an account failure never holds up that record. The
journal remembers the answer, so an interrupted change finishes the
accounts too; a journal from an earlier version, which has no answer,
finishes on the disk alone.
Consent names the new disk password. Finishing an interrupted change with the old disk key rolls the disk change back, so it must also discard the account-sync choice. Persist that answer with the confirmed old slot before recording it, keeping retries after that point on the disk alone. Exercise every interruption with login and root passwords distinct from the disk password, so the rollback cannot silently overwrite either account.

Co-Authored-By: GPT-6 in Codex <noreply@openai.com>
Co-Authored-By: Claude Opus 5.5 High via Pi <noreply@anthropic.com>
LUKS2 replaces a key within the same slot, so a retry's slot number alone cannot identify the old password. Record a checksum of the public keyslot metadata before an opted-in change; an unchanged slot drops account synchronization on rollback, while a changed slot keeps consent when the new key already landed. Retain the conservative disk-only result for older ambiguous journals that recorded no checksum. Run the opt-in interruption cases against real LUKS1 and LUKS2 on both platform fixtures, using distinct account passwords.

Co-Authored-By: GPT-6 in Codex <noreply@openai.com>
Co-Authored-By: Claude Opus 5.5 High via Pi <noreply@anthropic.com>
@greptile-apps

greptile-apps Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 4/5

[Critical risk] Adds password synchronization between disk encryption and login accounts.

The PR appears safe to merge, with a non-blocking correction to the account failure message.

Findings

  1. P2 Changed login password is misreported ▶

Summary

This PR offers to match the login and root passwords when changing the system disk password, with no as the default.

  • Account updates follow disk verification and platform slot recording.
  • Interrupted changes retain the owner's choice and retry unfinished account updates.
  • One non-blocking issue remains: the failure message can hide a successful login password update.
Diagram
%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Select encrypted drive] --> B{System disk and login user?}
  B -->|Yes| C[Ask whether account passwords should match]
  B -->|No| D[Change disk password only]
  C -->|Cancel| E[Stop without changes]
  C -->|No| D
  C -->|Yes| F[Save choice and old slot fingerprint]
  F --> G[Change and verify disk password]
  G --> H[Record platform owner slot]
  H --> I[Save accounts phase]
  I --> J[Update login then root password]
  J -->|Both succeed| K[Remove journal]
  J -->|Failure| L[Keep journal for retry]
Loading

Reviews (1) · Last reviewed commit: "Distinguish in-place LUKS2 changes from ..." · Reviewed by Greptile

Comment thread bin/omarchy-drive-password Resolved
@omarchybot
omarchybot marked this pull request as draft October 8, 2026 08:32
The login password may already have changed when the root update fails. Say the updates did not finish instead of implying both passwords are unchanged, and cover that partial-success result in the existing retry test.

Co-Authored-By: GPT-6 in Codex <noreply@openai.com>
Co-Authored-By: Greptile <165735046+greptile-apps[bot]@users.noreply.github.com>
@omarchybot

Copy link
Copy Markdown
Collaborator Author

Reviewed account synchronization with Claude Opus 5.5 High via Pi. The delivered changes leave distinct account passwords unchanged when a disk re-key rolls back and retain consent when a LUKS2 key change finished in the same slot. Both failures were reproduced against the earlier code; the corrected command passes 76 focused checks, including actual file-backed LUKS1 and LUKS2 volumes on x86 and Apple platform fixtures. Mac owner-slot recording still completes before account updates.

Claude's third round found no blocking issue in that logic at f953acb. Greptile then caught a misleading partial-failure message: the login password can already have changed when the root update fails. Commit e622189 reports unfinished updates accurately; restoring the old wording makes the strengthened retry check fail. That wording correction received the worker check rather than a fourth Claude round. The combined final tree has 5,329 passing checks and only the three established base failures.

This stays a draft stacked on #14431. After #14431 lands, its branch must be updated with the landed core and retargeted to quattro before the account policy can land separately.

@maralcbr

Copy link
Copy Markdown
Member

@ryanrhughes this one needs a call from you or DHH before it moves.

It's the part jandrusk asked to split out of #14431. After the system disk's password changes, it asks "Also set the login password for and the root password to the new disk password?", defaulting to no. Data drives and root runs are never asked, and the passwords go over stdin only.

  1. Sync root as well as login, login only, or drop it? Install starts with one password for disk, user and root, but the User menu's passwd never touches root.
  2. If root stays, what about a locked root account? Setting its password unlocks root logins. We could skip a locked root, or say so in the prompt.

The branch still targets the merged omabot/pr-13362, so it needs a rebase onto quattro, ideally after #14874, since both touch finish_interrupted_change. I've checked locally that the conflicts resolve cleanly and the drive-password tests pass with both. One small fix: on the rare LUKS1 interrupted-change path, it should say the login and root passwords were left unchanged instead of dropping the opt-in silently.

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.

3 participants