Repository navigation
Remove the sudo lockout reset command - #8046
Merged
Merged
Conversation
Nothing in the repository called omarchy-sudo-reset, and its one line interpolated an environment-supplied $USER into a string handed to a root shell: `su -c "faillock --reset --user $USER"`. $USER is an environment variable rather than a kernel-supplied identity, so whatever set it before the command ran chose the rest of what root's shell executed. That is not a way past PAM on its own — su still has to authenticate — but the installer sets root's password to the user's own, so the prompt this raises is one the user answers by habit. It bought little for that. Omarchy sets `deny=10 unlock_time=120` in /etc/pam.d/system-auth and in the lock screen's PAM stack, so a lockout takes ten wrong passwords to reach and clears itself two minutes later, and the manual documents the root-TTY reset for anyone who would rather not wait. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Co-Authored-By: Codex XHigh <[email protected]>
Contributor
There was a problem hiding this comment.
Copilot wasn't able to review any files in this pull request.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
omarchybot
added a commit
that referenced
this pull request
Aug 24, 2026
Backport of the omarchy-sudo-reset removal (PR #8046, merged to quattro as d99d4fc) onto the v4-0-1 release branch, so 4.0.1 stops shipping the command. Nothing in the repository called omarchy-sudo-reset, and its one line interpolated an environment-supplied $USER into a string handed to a root shell: su -c "faillock --reset --user $USER". $USER is an environment variable rather than a kernel-supplied identity, so whatever set it before the command ran chose the rest of what root's shell executed. That is not a way past PAM on its own -- su still has to authenticate -- but the installer sets root's password to the user's own, so the prompt this raises is one the user answers by habit. It bought little for that. Omarchy sets deny=10 unlock_time=120 in /etc/pam.d/system-auth and in the lock screen's PAM stack, so a lockout takes ten wrong passwords to reach and clears itself two minutes later, and manual/45-troubleshooting.md documents the root-TTY reset for anyone who would rather not wait. That reset is unaffected by this change. The sudo group keeps keepalive and passwordless, so GROUP_DESCRIPTIONS[sudo] is unchanged and omarchy sudo reset falls through to the router's unknown-command path. No migration is needed: bin/omarchy-* ships as files in the omarchy package, so an upgrade drops what the package no longer contains. Clean cherry-pick: the file was byte-identical to quattro's pre-image and nothing else on this branch referenced it, so merging v4-0-1 into quattro resolves without a conflict. test/shell and test/cli pass here. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_018DEMYa9UWtroz93DhMTtcV
Closed
nick1udwig
pushed a commit
to nick1udwig/omarchy
that referenced
this pull request
Sep 9, 2026
Nothing in the repository called omarchy-sudo-reset, and its one line interpolated an environment-supplied $USER into a string handed to a root shell: `su -c "faillock --reset --user $USER"`. $USER is an environment variable rather than a kernel-supplied identity, so whatever set it before the command ran chose the rest of what root's shell executed. That is not a way past PAM on its own — su still has to authenticate — but the installer sets root's password to the user's own, so the prompt this raises is one the user answers by habit. It bought little for that. Omarchy sets `deny=10 unlock_time=120` in /etc/pam.d/system-auth and in the lock screen's PAM stack, so a lockout takes ten wrong passwords to reach and clears itself two minutes later, and the manual documents the root-TTY reset for anyone who would rather not wait. Co-authored-by: David Heinemeier Hansson <[email protected]> Co-authored-by: Claude Opus 5 (1M context) <[email protected]> Co-authored-by: Codex XHigh <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
omarchy sudo resetwas a single line, and that line handed an environment variable to a root shell:su -c "faillock --reset --user $USER"$USERis an environment variable rather than a kernel-supplied identity, so whatever set it before the command ran chose the rest of the string root's shell would execute: withUSER='dhh; curl … | sh',suis asked to runfaillock --reset --user dhh; curl … | sh. This is not a way past PAM on its own —sustill has to authenticate, and an attacker who could already runsuas root would not need the detour. What makes it worth removing rather than quoting is the prompt it puts in front of the user.install/provisioning/setup-form.shsets root's password to the user's own ("Used for user + root"), andbin/omarchy-provision-ownerdoes the same on deferred provisioning, so the passwordsuasks for is the one the user types into sudo prompts all day, at a prompt a documented Omarchy command just raised.It bought little in return. Omarchy's PAM configuration sets
deny=10 unlock_time=120on/etc/pam.d/system-auth(install/config/increase-lockout-limit.sh) and on the lock screen's own stack (bin/omarchy-apply-lock), so a lockout takes ten wrong passwords to reach and clears itself two minutes later. For anyone who would rather not wait,manual/45-troubleshooting.mddocuments the TTY-and-root reset, which still works and is unaffected by this change. Nothing in the repository called the command; the CLI router was its only caller.The
sudogroup keepskeepaliveandpasswordless, soGROUP_DESCRIPTIONS[sudo]is unchanged, andomarchy sudo resetnow falls through to the router's unknown-command path. No migration is needed:bin/omarchy-*ships as files in theomarchypackage, so an upgrade drops what the package no longer contains — the same handling every previous command removal has had.One reference survives on purpose.
basecamp/omarchy-iso'smanifests/fresh-4-semantic.jsonlistsomarchy-sudo-resetamong the commands a built v4 image contained. That file is a capture of what shipped rather than a live index, and editing it would falsify the record.🤖 Generated by Opus 5 in Claude Code. Reviewed by Codex XHigh.