How can normal users (users without sudo permissions) shutdown the system remotely?
You can use
policykit (make sure
policykit-1 is installed).
Create as root
/etc/polkit-1/localauthority/50-local.d/all_all_users_to_shutdown_reboot.pkla with the following content:
[Allow all users to shutdown and reboot] Identity=unix-user:* Action=org.freedesktop.login1.power-off;org.freedesktop.login1.power-off-multiple-sessions;org.freedesktop.login1.reboot;org.freedesktop.login1.reboot-multiple-sessions ResultAny=yes
The advantage of this method is, that you can disallow a user to shutdown, if others are logged in (omit the
The other way to do it is to add a line to your
ALL ALL=(root) NOPASSWD: /sbin/shutdown
Make sure you use
visudo as root to edit the file.
They will need to be on the box (
ssh) to be able to run the shutdown command.