diff options
Diffstat (limited to 'etc/sudoers-rs')
| -rw-r--r-- | etc/sudoers-rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/etc/sudoers-rs b/etc/sudoers-rs new file mode 100644 index 0000000..8326b8e --- /dev/null +++ b/etc/sudoers-rs @@ -0,0 +1,13 @@ +# Keep $EDITOR / $VISUAL when running visudo. +Defaults!/usr/bin/visudo-rs env_keep += "SUDO_EDITOR EDITOR VISUAL" +Defaults!/usr/local/bin/visudo env_keep += "SUDO_EDITOR EDITOR VISUAL" + +# Sanitize PATH for elevated commands. +Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/bin" + +# Root and the wheel group can run anything (after a password prompt). +root ALL=(ALL:ALL) ALL +%wheel ALL=(ALL:ALL) ALL + +# Passwordless poweroff/reboot (parity with the previous doas.conf). +%wheel ALL=(ALL) NOPASSWD: /usr/bin/poweroff, /usr/bin/reboot |
