View Single Post
  #1   (View Single Post)  
Old 20th May 2012
sw2wolf sw2wolf is offline
λ programmer
 
Join Date: Mar 2012
Location: China
Posts: 133
Default Why do we need password to shutdown the box ?

Code:
>uname -a
FreeBSD mybsd.zsoft.com 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Tue Jan  3 07:15:25 UTC 2012     root@obrian.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386

>cat /usr/local/etc/sudoers | grep NOPASSWD
%wheel ALL = NOPASSWD:/sbin/shutdown -p now,/sbin/shutdown -r now

>id
uid=1001(sw2wolf) gid=1001(sw2wolf) groups=1001(sw2wolf),0(wheel),5(operator),920(vboxusers)
However, I still need to input the root's password to shutdown the box when running `sudo /sbin/shutdown -p now` or `sudo /sbin/shutdown -r now` .
Reply With Quote