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