Blame SOURCES/sudoers

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