Hi there,
I just started getting to know doas a bit, and am already stumped (pretty
typical for me..).
I'm trying to let my user shutdown, reboot and suspend the computer without
entering a password. This is my doas.conf:
permit keepenv { ENV PS1 SSH_AUTH_SOCK } :wheel
permit nopass toby as root cmd /sbin/shutdown
permit nopass toby as root cmd /sbin/reboot
permit nopass toby as root cmd /usr/sbin/zzz
I can suspend successfully, but attempting to shutdown or reboot, returns:
ksh: shutdown: cannot execute - Permission denied
I assume it's something to do with those executables being in sbin. How
might I go about allowing my user to shutdown?
I also have a simple syntax query:
Initially my /etc/doas.conf looked like this (still in sudo mindset mode
apparently!):
permit keepenv { ENV PS1 SSH_AUTH_SOCK } :wheel
permit nopass toby as root cmd /sbin/shutdown, /sbin/reboot, /usr/sbin/zzz
Then I tried:
permit nopass toby as root cmd {/sbin/shutdown /sbin/reboot /usr/sbin/zzz}
... thinking it might be the same as keepenv args demonstrated in man page.
No dice.
Is there a way to specify multiple commands on the same line?
--
0x2b || !0x2b