HOW TO SHUTDOWN WITHOUT SUDO PASSWORD (ubuntu, debian)

Updated . Posted . Visible to the public.

in /etc/sudoer add following line

    username ALL = NOPASSWD: /sbin/shutdown

also to allow at group level

    %admin  ALL = NOPASSWD: /sbin/shutdown

now one can use shutdown command without sudo password, but shutdown command still needs sudo command like

    sudo shutdown -h now
Tushar
Last edit
Posted by Tushar to Tushar's deck (2012-01-19 20:27)