Blame SOURCES/sudoers

0eb21d
## Sudoers allows particular users to run various commands as
0eb21d
## the root user, without needing the root password.
0eb21d
##
0eb21d
## Examples are provided at the bottom of the file for collections
0eb21d
## of related commands, which can then be delegated out to particular
0eb21d
## users or groups.
0eb21d
## 
0eb21d
## This file must be edited with the 'visudo' command.
0eb21d
0eb21d
## Host Aliases
0eb21d
## Groups of machines. You may prefer to use hostnames (perhaps using 
0eb21d
## wildcards for entire domains) or IP addresses instead.
0eb21d
# Host_Alias     FILESERVERS = fs1, fs2
0eb21d
# Host_Alias     MAILSERVERS = smtp, smtp2
0eb21d
0eb21d
## User Aliases
0eb21d
## These aren't often necessary, as you can use regular groups
0eb21d
## (ie, from files, LDAP, NIS, etc) in this file - just use %groupname 
0eb21d
## rather than USERALIAS
0eb21d
# User_Alias ADMINS = jsmith, mikem
0eb21d
0eb21d
0eb21d
## Command Aliases
0eb21d
## These are groups of related commands...
0eb21d
0eb21d
## Networking
0eb21d
# Cmnd_Alias NETWORKING = /sbin/route, /sbin/ifconfig, /bin/ping, /sbin/dhclient, /usr/bin/net, /sbin/iptables, /usr/bin/rfcomm, /usr/bin/wvdial, /sbin/iwconfig, /sbin/mii-tool
0eb21d
0eb21d
## Installation and management of software
0eb21d
# Cmnd_Alias SOFTWARE = /bin/rpm, /usr/bin/up2date, /usr/bin/yum
0eb21d
0eb21d
## Services
0eb21d
# Cmnd_Alias SERVICES = /sbin/service, /sbin/chkconfig, /usr/bin/systemctl start, /usr/bin/systemctl stop, /usr/bin/systemctl reload, /usr/bin/systemctl restart, /usr/bin/systemctl status, /usr/bin/systemctl enable, /usr/bin/systemctl disable
0eb21d
0eb21d
## Updating the locate database
0eb21d
# Cmnd_Alias LOCATE = /usr/bin/updatedb
0eb21d
0eb21d
## Storage
0eb21d
# Cmnd_Alias STORAGE = /sbin/fdisk, /sbin/sfdisk, /sbin/parted, /sbin/partprobe, /bin/mount, /bin/umount
0eb21d
0eb21d
## Delegating permissions
0eb21d
# Cmnd_Alias DELEGATING = /usr/sbin/visudo, /bin/chown, /bin/chmod, /bin/chgrp 
0eb21d
0eb21d
## Processes
0eb21d
# Cmnd_Alias PROCESSES = /bin/nice, /bin/kill, /usr/bin/kill, /usr/bin/killall
0eb21d
0eb21d
## Drivers
0eb21d
# Cmnd_Alias DRIVERS = /sbin/modprobe
0eb21d
0eb21d
# Defaults specification
0eb21d
0eb21d
#
0eb21d
# Refuse to run if unable to disable echo on the tty.
0eb21d
#
0eb21d
Defaults   !visiblepw
0eb21d
0eb21d
#
0eb21d
# Preserving HOME has security implications since many programs
0eb21d
# use it when searching for configuration files. Note that HOME
0eb21d
# is already set when the the env_reset option is enabled, so
0eb21d
# this option is only effective for configurations where either
0eb21d
# env_reset is disabled or HOME is present in the env_keep list.
0eb21d
#
0eb21d
Defaults    always_set_home
0eb21d
Defaults    match_group_by_gid
0eb21d
0eb21d
# Prior to version 1.8.15, groups listed in sudoers that were not
0eb21d
# found in the system group database were passed to the group
0eb21d
# plugin, if any. Starting with 1.8.15, only groups of the form
0eb21d
# %:group are resolved via the group plugin by default.
0eb21d
# We enable always_query_group_plugin to restore old behavior.
0eb21d
# Disable this option for new behavior.
0eb21d
Defaults    always_query_group_plugin
0eb21d
0eb21d
Defaults    env_reset
0eb21d
Defaults    env_keep =  "COLORS DISPLAY HOSTNAME HISTSIZE KDEDIR LS_COLORS"
0eb21d
Defaults    env_keep += "MAIL PS1 PS2 QTDIR USERNAME LANG LC_ADDRESS LC_CTYPE"
0eb21d
Defaults    env_keep += "LC_COLLATE LC_IDENTIFICATION LC_MEASUREMENT LC_MESSAGES"
0eb21d
Defaults    env_keep += "LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER LC_TELEPHONE"
0eb21d
Defaults    env_keep += "LC_TIME LC_ALL LANGUAGE LINGUAS _XKB_CHARSET XAUTHORITY"
0eb21d
0eb21d
#
0eb21d
# Adding HOME to env_keep may enable a user to run unrestricted
0eb21d
# commands via sudo.
0eb21d
#
0eb21d
# Defaults   env_keep += "HOME"
0eb21d
0eb21d
Defaults    secure_path = /sbin:/bin:/usr/sbin:/usr/bin
0eb21d
0eb21d
## Next comes the main part: which users can run what software on 
0eb21d
## which machines (the sudoers file can be shared between multiple
0eb21d
## systems).
0eb21d
## Syntax:
0eb21d
##
0eb21d
## 	user	MACHINE=COMMANDS
0eb21d
##
0eb21d
## The COMMANDS section may have other options added to it.
0eb21d
##
0eb21d
## Allow root to run any commands anywhere 
0eb21d
root	ALL=(ALL) 	ALL
0eb21d
0eb21d
## Allows members of the 'sys' group to run networking, software, 
0eb21d
## service management apps and more.
0eb21d
# %sys ALL = NETWORKING, SOFTWARE, SERVICES, STORAGE, DELEGATING, PROCESSES, LOCATE, DRIVERS
0eb21d
0eb21d
## Allows people in group wheel to run all commands
0eb21d
%wheel	ALL=(ALL)	ALL
0eb21d
0eb21d
## Same thing without a password
0eb21d
# %wheel	ALL=(ALL)	NOPASSWD: ALL
0eb21d
0eb21d
## Allows members of the users group to mount and unmount the 
0eb21d
## cdrom as root
0eb21d
# %users  ALL=/sbin/mount /mnt/cdrom, /sbin/umount /mnt/cdrom
0eb21d
0eb21d
## Allows members of the users group to shutdown this system
0eb21d
# %users  localhost=/sbin/shutdown -h now
0eb21d
0eb21d
## Read drop-in files from /etc/sudoers.d (the # here does not mean a comment)
0eb21d
#includedir /etc/sudoers.d