%sudo ALL=(ALL) ALL
#includedir /etc/sudoers.d
The first one allows all users from sudo group to do everything they want and the second one demonstrates a way to create a flexible sudo configuration.
%sudo ALL=(ALL) ALL
#includedir /etc/sudoers.d
#!/bin/sh
### BEGIN INIT INFO
# Provides: haltIfNousers
# Required-Start:
# Required-Stop:
# Should-Start: gdm
# Default-Start: 2 3
# Default-Stop: 4 5
# Short-Description: Execute the halt command.
# Description:
### END INIT INFO
#Powers off the system if no user is logged in in 30 seconds
BLOCK_FILE=/tmp/haltIfNousers
case "$1" in
start)
$0 wait &
;;
wait)
touch "$BLOCK_FILE"
sleep 30
[ -e "$BLOCK_FILE" ] || exit 0
if ! who|grep '.*' -q ; then
echo $0: No users are logged in. Halting now.
shutdown -h now
exit 0
fi
rm -f "$BLOCK_FILE"
;;
restart|reload|force-reload)
echo "Error: argument '$1' not supported" >&2
exit 3
;;
stop)
rm -f "$BLOCK_FILE"
;;
*)
echo "Usage: $0 start|stop" >&2
exit 3
;;
esac