Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

visudo: Prevent locking yourself out #190

Open
keks24 opened this issue Oct 26, 2022 · 0 comments
Open

visudo: Prevent locking yourself out #190

keks24 opened this issue Oct 26, 2022 · 0 comments

Comments

@keks24
Copy link

keks24 commented Oct 26, 2022

Hello!

Would it be possible to check the following syntax and intercept it?:

ALL ALL=(ALL) !ALL

I am thinking of a condition something this:

if(<command> == "!ALL" && <username_euid> == 0)
{
     printf("%s", "Not a syntax error, but do not lock yourself out!");
     <sudo_not_save_file>
}

A few sentences for insults`:

  • You do not want to lock yourself out, do you?
  • Oh, he did it again!
  • What would you do without me? :)
  • Blasphemy!
  • No! Bad human! Sit!

Having su or other alternatives as backup should be considered as a workaround solution.

-Ramon

PS: This emerged from the Gentoo User mailing list discussion: [gentoo-user] Update to /etc/sudoers disables wheel users!!!. Word pun intended. 😄

@keks24 keks24 changed the title visudo: Prevent locking yourself out visudo: Prevent locking yourself out Oct 26, 2022
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

No branches or pull requests

1 participant