I'm setting up a minimalistic ubuntu based system with openbox as a window manager. Unlike the more full functioned window managers, there's no single click shutdown option. While i can shutdown using cli – this needs me to use sudo, and well, this isn't what i want. Is there any way to make the halt or poweroff commands work for any user, without the need for a password?
Ubuntu – Shutdown without sudo user password in ubuntu
shutdownUbuntu
Best Answer
Run
visudo
and add%users ALL=(ALL) NOPASSWD: /sbin/poweroff, /sbin/reboot
So you can run
sudo poweroff
orsudo reboot
without enter the user password.