Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 9 down vote accepted

Run visudo and add %users ALL=(ALL) NOPASSWD: /sbin/poweroff, /sbin/reboot

So you can run sudo poweroff or sudo reboot without enter the user password.

share|improve this answer

You can configure ACPI to trigger a shutdown when the power button is pressed. In Ubuntu this is the default behavior if nothing else is running that handles the power management. Have a look at /etc/acpi/

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.