root:# cat /etc/sudoers
#
# Sample /etc/sudoers file. (Assumes Linux paths)
#
# ~# chown root.root /etc/sudoers
# ~# chmod 440 /etc/sudoers
#
# This file MUST be edited with the 'visudo' command as root.
#
# See the man page for the details on how to write a sudoers file.
#
##
# User alias specification
##
#User_Alias FULLTIMERS=millert,mikef,dowdy
#User_Alias PARTTIMERS=bostley,jwfox,mccreary
##
# Cmnd alias specification
##
#Cmnd_Alias DUMPS=/usr/etc/dump,/usr/etc/rdump,/usr/etc/restore,\
# /usr/etc/rrestore,/usr/bin/mt
#Cmnd_Alias KILL=/bin/kill
#Cmnd_Alias PRINTING=/usr/bin/lpc,/usr/bin/lprm
Cmnd_Alias SHUTDOWN=/sbin/shutdown,/sbin/halt,/sbin/fasthalt,/sbin/reboot,/sbin/fastboot,/usr/libexec/xfsm-shutdown-helper
Cmnd_Alias DIAL=/usr/bin/gkdial,/usr/X11R6/bin/xisp
Cmnd_Alias SERVER=/opt/lampp/lampp
Cmnd_Alias HW1=/usr/X11R6/bin/flphoto
Cmnd_Alias HW2=/usr/X11R6/bin/qtparted
Cmnd_Alias VASM=/sbin/vasm,/sbin/vlapt
Cmnd_Alias MOUNT1=/lib/udev/vl-hot_mount,/lib/udev/vl-hot_umount,/bin/mount,/bin/umount,/usr/bin/disktype
Cmnd_Alias PDMOUNT=/usr/X11/bin/mkpdmount,/usr/X11/bin/rmpdmount
Cmnd_Alias SGMAP=/usr/bin/sg_map
Cmnd_Alias WIFI=/sbin/iwconfig,/sbin/vwifi2,/sbin/modprobe,/usr/sbin/wifi-radar,/sbin/dhcpcd,/sbin/ifconfig
Cmnd_Alias SMBMOUNT=/usr/bin/smbmount,/usr/bin/smbumount,/usr/bin/smbclient
#Cmnd_Alias SHELLS=/bin/sh,/bin/csh,/bin/ksh,\
# /bin/tcsh,/bin/rsh,\
# /bin/zsh
#Cmnd_Alias SU=/bin/su
#Cmnd_Alias VIPW=/usr/bin/vipw,/bin/vipw,/usr/bin/passwd
##
# Host alias specification
##
#Host_Alias SUN4=bruno,eclipse,moet,anchor
#Host_Alias SUN3=brazil,columbine
#Host_Alias DECSTATION=wilkinson,soma,dendrite,thang
#Host_Alias DECALPHA=widget,thalamus,foobar
#Host_Alias HPSNAKE=boa,nag,python
#Host_Alias CSNETS=128.138.243.0,128.138.204.0,128.138.242.0
#Host_Alias CUNETS=128.138.0.0/255.255.0.0
##
# User specification
##
# root and users in group wheel can run anything on any machine as any user
root ALL=(ALL) ALL
#%wheel ALL=(ALL) ALL
# melvin can run anything on any machine without a password
#melvin ALL=NOPASSWD:ALL
# anyone in the group 'users' can run some programs without a password
%users ALL=NOPASSWD:SHUTDOWN,DIAL,SERVER,HW1,MOUNT1,SGMAP,PDMOUNT,SMBMOUNT,WIFI
# anyone in the group 'users' can run some programs with a password
%users ALL=VASM,HW2
# full time sysadmins can run anything on any machine without a password
#FULLTIMERS ALL=NOPASSWD:ALL
# part time sysadmins may run anything except root shells or su
#PARTTIMERS ALL=ALL,!SU,!SHELLS
# rodney may run anything except root shells or su on machines in CSNETS
#rodney CSNETS=ALL,!SU,!SHELLS
# smartguy may run any command on any host in CUNETS (call B address)
#smartguy CUNETS=ALL
# operator may run maintenance commands and anything in /usr/bin/
#operator ALL=DUMPS,KILL,PRINTING,SHUTDOWN,HALT,REBOOT,/usr/bin/
# joe may su only to operator
#joe /bin/su operator
# pete may change passwords for anyone but root
#pete /bin/passwd [A-z]*,!/bin/passwd root
# bob may run anything except root shells or su on the sun3 and sun4 machines
#bob SUN4=ALL,!SU,!SHELLS:\
# SUN3=ALL,!SU,!SHELLS
# jim may run anything on machines in the biglab netgroup
#jim +biglab=ALL
# users in the secretaries netgroup need to help manage the printers
#+secretaries ALL=PRINTING
# fred can run /bin/ls as oracle by specifying -u oracle on command line;
# he can also run /bin/date as uid -2 without entering a password
#fred ALL=(oracle) /bin/ls,(#-2) NOPASSWD:/bin/date
# somedude may su to anyone but root and must give su an argument
#somedude ALL=/bin/su ?*, !/bin/su root
Here is mine, be careful, a bad sudoers file is the last thing you want.
do you mean add it to here?
Cmnd_Alias SHUTDOWN=/sbin/shutdown,/sbin/halt,/sbin/fasthalt,/sbin/reboot,/sbin/fastboot,/usr/libexec/xfsm-shutdown-helper
Yep, so it will look
Cmnd_Alias
SHUTDOWN=/sbin/shutdown,/sbin/halt,/sbin/fasthalt,/sbin/reboot,/sbin/fastboot,/usr/libexec/xfsm-shutdown-helper,/usr/sbin/hibernate
To test it run sudo /usr/sbin/hibernate