sudoers for passwordless sudoedit, except for sudoers
1
vote
1
answer
44
views
I want to configure passwordless sudoedit, to edit files under
/etc
with the exception of sudoers files themselves.
I tried using the following /etc/sudoers.d/sudoedit
:
%sudo ALL=(root) NOPASSWD: sudoedit ^/etc/(?!sudo).*$
but that does not seem to work as sudo uses an old regex engine without the negative lookahead feature.
Is there another way to achieve this? Maybe with the combination of /etc
and the negation of !/etc/sudo
?
Asked by thiago
(133 rep)
Nov 28, 2024, 06:46 PM
Last activity: Nov 29, 2024, 09:18 PM
Last activity: Nov 29, 2024, 09:18 PM