Run shutdown as normal user, without sudo

Just change ownership on the binary:

sudo chmod a+s /sbin/shutdown

 

[[email protected] ~]$shutdown -h 21:28
shutdown: Need to be root
[[email protected] ~]$sudo chmod a+s /sbin/shutdown
[[email protected] ~]$shutdown -h 21:28

Broadcast message from [email protected]
        (/dev/pts/0) at 21:21 ...

The system is going down for halt in 7 minutes!

 


You are reading this post on Joel G Mathew’s tech blog. Joel's personal blog is the Eyrie, hosted here.