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