Blame SOURCES/sudoers

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