How can I forbid the user in FreeBSD to execute the poweroff or reboot?
Ok, then i have a more specified question, how can i allow the user to poweroff the system and forbid to reboot it? i have already searched throuth the login.conf and didn't find anything connected with this...
permit nopass keepenv :wheel
deny username as root cmd reboot
/sbin/reboot
even when passing doas beforehand and returned a doas: Operation not permitted
error after a failed attempt. If any of those settings is not ok fro you, just remove 'nopass', 'keepenv', replace the group, etc...permit setenv { -ENV PATH=/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin/bin} username as root
Yeah, but is there the way to user have root access and do not being allowed these commands?)
Ok, then i have a more specified question, how can i allow the user to poweroff the system and forbid to reboot it? i have already searched throuth the login.conf and didn't find anything connected with this...