Skip to content

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

Closed
maralcbr wants to merge 1 commit into
omabot/pr-13362from
drive-password-account-sync
Closed

maralcbr wants to merge 1 commit into
omabot/pr-13362from
drive-password-account-sync

Conversation

@maralcbr

@maralcbr maralcbr commented Oct 7, 2026

Copy link
Copy Markdown
Member

Split out of #14431, as @jandrusk asked: changing the system disk's password there also set the login and root passwords on every platform, x86 included, with no way to say no. This PR brings that back only as an explicit choice.

Stacked on #14431. Only the last commit is new here. The commit before it, ee46d0e51 ("Change only the disk password in omarchy-drive-password", branch omacom/omarchy-mac:drive-password-disk-only), takes the account change out of #14431 and is offered for that PR. I'll rebase this onto quattro once #14431 lands.

What changes

For the system disk only, omarchy-drive-password asks:

Also set the login password for <user> and the root password to the new disk password?

  • Defaults to no. Ctrl-C cancels the whole change.
  • Not asked for other encrypted drives, or when there's no login user (run as root).
  • With yes, the accounts change only after the new key opens the disk, the old one no longer does, and a platform that checks key slots (Apple Silicon) has recorded the new slot. An account failure never holds up that record.
  • The journal (~/.local/state/omarchy/drive-password.state, never a password) keeps the answer, so an interrupted change finishes the accounts too. A journal written before this change has no answer and finishes on the disk alone.

Why it's a choice

Setup gives the disk, the login user and root one password, so changing only the disk's lets them drift apart. But someone who deliberately keeps different passwords must not have them overwritten, so the default is no.

Testing

test/shell.d/drive-password-test.sh in an Arch Linux ARM container with real cryptsetup (fake, LUKS1 and LUKS2 volumes, x86 and Apple fixtures): 68 checks pass. The new ones cover the yes path killed after every step and rerun, a failed root chpasswd finished by the next run, the slot recorded before the accounts, Ctrl-C, data drives, no login user, a legacy journal, and a journal with an unknown answer. With the default no, the suite also checks the login and root passwords never change.

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.
@omarchybot

Copy link
Copy Markdown
Collaborator

Reviewed this separate account-password scope with Claude Opus 5.5 High via Pi. A retry that rolled back a disk-password change could overwrite distinct login and root passwords with the old disk password. The carried fix discards that consent on rollback, while a checksum of public LUKS2 keyslot metadata preserves it when a new key already replaced the old key in place.

Both failure cases were reproduced on an isolated ISO worker. The final drive-password suite passes 76 checks, including real LUKS1 and LUKS2 changes and interruption retries on x86 and Apple fixtures. The default-no behavior and Mac owner-slot recording remain intact. Claude's third review found no blocking defect; optional malformed-journal and message suggestions were not treated as demonstrated failures. The full integration suite result is recorded on the replacement.

GitHub rejects the bot's push to omacom/omarchy-mac with 403. The replacement preserves @maralcbr's commits unchanged and carries the fixes on top. It remains stacked on #14431, pending that PR landing and retargeting to quattro.

Continued in #14556.

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.

2 participants