Skip to content

feat: notify users attempting to use sudo#1440

Merged
RoyalOughtness merged 3 commits intosecureblue:livefrom
HastD:sudo-error
Oct 7, 2025
Merged

feat: notify users attempting to use sudo#1440
RoyalOughtness merged 3 commits intosecureblue:livefrom
HastD:sudo-error

Conversation

@HastD
Copy link
Copy Markdown
Collaborator

@HastD HastD commented Oct 6, 2025

Fixes #1436.

@HastD HastD requested a review from RoyalOughtness as a code owner October 6, 2025 20:12
@mathbreed
Copy link
Copy Markdown
Contributor

If this is implemented by some sort of pattern matching, could we also inform users that run0 nano/run0 vim should be avoided and tell them to use run0edit instead?

@HastD
Copy link
Copy Markdown
Collaborator Author

HastD commented Oct 7, 2025

This is not implemented by any sort of pattern matching. (The only pattern matching going on here is matching $- against *i* to determine whether the shell session is interactive.) It's implemented by creating a shell function called sudo, which runs when the user attempts to invoke the sudo command. In theory this could be done for other commands, but that seems like it would be complicated to maintain for not much benefit. The reason for doing this with sudo is that it's a very widely used command that's absent on Secureblue, and is therefore a common source of confusion for new users.

@RoyalOughtness RoyalOughtness merged commit 69d09a9 into secureblue:live Oct 7, 2025
14 checks passed
@HastD HastD deleted the sudo-error branch October 7, 2025 18:04
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.

[FEAT] Notify users attempting to use sudo

4 participants