From 525a235ea8c4c4aa20959c6e5db237b8c706a0f5 Mon Sep 17 00:00:00 2001 From: Jakub Date: Wed, 24 Jul 2024 22:29:30 -0400 Subject: [PATCH] add power commands for sudoers file --- root/etc/sudoers.d/power-commands | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 root/etc/sudoers.d/power-commands diff --git a/root/etc/sudoers.d/power-commands b/root/etc/sudoers.d/power-commands new file mode 100644 index 0000000..8474b40 --- /dev/null +++ b/root/etc/sudoers.d/power-commands @@ -0,0 +1,8 @@ +# allow wheel users to run power commands with no passwd +%wheel ALL=(ALL:ALL) NOPASSWD: /bin/systemctl suspend +%wheel ALL=(ALL:ALL) NOPASSWD: /bin/systemctl hibernate +%wheel ALL=(ALL:ALL) NOPASSWD: /bin/systemctl hybrid-sleep +%wheel ALL=(ALL:ALL) NOPASSWD: /bin/systemctl poweroff +%wheel ALL=(ALL:ALL) NOPASSWD: /bin/systemctl reboot +%wheel ALL=(ALL:ALL) NOPASSWD: /bin/shutdown +%wheel ALL=(ALL:ALL) NOPASSWD: /bin/reboot