I want to be able to shutdown (or restart) my system without having to enter my password. My
/etc/doas.conf
looks like this and my user is in the wheel
group
permit nopass :wheel as root cmd /sbin/poweroff
permit nopass :wheel as root cmd /sbin/reboot
permit :wheel
I thought this would be enough so I can enter
$ poweroff
but I get the message
> poweroff: must be superuser.
when I do
$ doas poweroff
I still have to enter my password.
How can I configure doas so that my user can poweroff
or reboot
without having to enter my password? And is it possible to configure it so that I don't have to enter doas
at all?
Asked by danielspaniol
(199 rep)
Aug 20, 2019, 07:18 AM
Last activity: Jun 11, 2025, 10:11 AM
Last activity: Jun 11, 2025, 10:11 AM