2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-22 09:57:41 +00:00
sudo/sample.sudoers

130 lines
3.9 KiB
Plaintext
Raw Normal View History

1993-11-28 00:25:23 +00:00
#
# Sample /etc/sudoers file.
1993-11-27 23:59:52 +00:00
#
# This file MUST be edited with the 'visudo' command as root.
#
1999-08-22 11:26:23 +00:00
# See the sudoers man page for the details on how to write a sudoers file.
1993-11-27 23:59:52 +00:00
#
1995-04-10 23:51:35 +00:00
##
# User alias specification
##
1999-08-22 11:26:23 +00:00
User_Alias FULLTIMERS = millert, mikef, dowdy
User_Alias PARTTIMERS = bostley, jwfox, crawl
User_Alias WEBMASTERS = will, wendy, wim
1995-04-10 23:51:35 +00:00
##
# Runas alias specification
##
1999-08-22 11:26:23 +00:00
Runas_Alias OP = root, operator
Runas_Alias DB = oracle, sybase
1995-04-10 23:51:35 +00:00
##
1999-08-22 11:26:23 +00:00
# Host alias specification
1995-04-10 23:51:35 +00:00
##
Host_Alias SPARC = bigtime, eclipse, moet, anchor:\
SGI = grolsch, dandelion, black:\
ALPHA = widget, thalamus, foobar:\
HPPA = boa, nag, python
1999-08-22 11:26:23 +00:00
Host_Alias CUNETS = 128.138.0.0/255.255.0.0
Host_Alias CSNETS = 128.138.243.0, 128.138.204.0/24, 128.138.242.0
1999-08-22 11:26:23 +00:00
Host_Alias SERVERS = master, mail, www, ns
Host_Alias CDROM = orion, perseus, hercules
1993-11-28 00:25:23 +00:00
1995-04-10 23:51:35 +00:00
##
1999-08-22 11:26:23 +00:00
# Cmnd alias specification
1995-04-10 23:51:35 +00:00
##
1999-08-22 11:26:23 +00:00
Cmnd_Alias DUMPS = /usr/sbin/dump, /usr/sbin/rdump, /usr/sbin/restore, \
/usr/sbin/rrestore, /usr/bin/mt
Cmnd_Alias KILL = /usr/bin/kill
Cmnd_Alias PRINTING = /usr/sbin/lpc, /usr/bin/lprm
Cmnd_Alias SHUTDOWN = /usr/sbin/shutdown
Cmnd_Alias HALT = /usr/sbin/halt, /usr/sbin/fasthalt
Cmnd_Alias REBOOT = /usr/sbin/reboot, /usr/sbin/fastboot
Cmnd_Alias SHELLS = /usr/bin/sh, /usr/bin/csh, /usr/bin/ksh, \
/usr/local/bin/tcsh, /usr/bin/rsh, \
/usr/local/bin/zsh
Cmnd_Alias SU = /usr/bin/su
Cmnd_Alias VIPW = /usr/sbin/vipw, /usr/bin/passwd, /usr/bin/chsh, \
/usr/bin/chfn
1993-11-27 23:59:52 +00:00
##
2003-04-13 19:48:15 +00:00
# Override built-in defaults
##
Defaults syslog=auth
Defaults:FULLTIMERS !lecture
Defaults:millert !authenticate
Defaults@SERVERS log_year, logfile=/var/log/sudo.log
1995-04-10 23:51:35 +00:00
##
1993-11-27 23:59:52 +00:00
# User specification
1995-04-10 23:51:35 +00:00
##
1996-01-14 20:39:26 +00:00
1996-06-15 22:11:08 +00:00
# root and users in group wheel can run anything on any machine as any user
1999-08-22 11:26:23 +00:00
root ALL = (ALL) ALL
%wheel ALL = (ALL) ALL
1993-11-28 00:25:23 +00:00
1996-06-15 22:11:08 +00:00
# full time sysadmins can run anything on any machine without a password
1999-08-22 11:26:23 +00:00
FULLTIMERS ALL = NOPASSWD: ALL
# part time sysadmins may run anything but need a password
PARTTIMERS ALL = ALL
1996-01-14 20:39:26 +00:00
1999-08-22 11:26:23 +00:00
# jack may run anything on machines in CSNETS
jack CSNETS = ALL
1996-01-14 20:39:26 +00:00
1999-08-22 11:26:23 +00:00
# lisa may run any command on any host in CUNETS (a class B network)
lisa CUNETS = ALL
1996-06-17 04:07:40 +00:00
1996-01-14 20:39:26 +00:00
# operator may run maintenance commands and anything in /usr/oper/bin/
1999-08-22 11:26:23 +00:00
operator ALL = DUMPS, KILL, PRINTING, SHUTDOWN, HALT, REBOOT,\
/usr/oper/bin/
1996-01-14 20:39:26 +00:00
# joe may su only to operator
1999-08-22 11:26:23 +00:00
joe ALL = /usr/bin/su operator
1996-01-14 20:39:26 +00:00
1999-08-22 11:26:23 +00:00
# pete may change passwords for anyone but root on the hp snakes
pete HPPA = /usr/bin/passwd [A-z]*, !/usr/bin/passwd root
1996-02-05 23:39:35 +00:00
1999-08-22 11:26:23 +00:00
# bob may run anything on the sparc and sgi machines as any user
# listed in the Runas_Alias "OP" (ie: root and operator)
bob SPARC = (OP) ALL : SGI = (OP) ALL
1996-01-14 20:39:26 +00:00
# jim may run anything on machines in the biglab netgroup
1999-08-22 11:26:23 +00:00
jim +biglab = ALL
1996-01-14 20:39:26 +00:00
# users in the secretaries netgroup need to help manage the printers
1999-08-22 11:26:23 +00:00
# as well as add and remove users
+secretaries ALL = PRINTING, /usr/bin/adduser, /usr/bin/rmuser
1999-08-22 11:26:23 +00:00
# fred can run commands as oracle or sybase without a password
fred ALL = (DB) NOPASSWD: ALL
1999-08-22 11:26:23 +00:00
# on the alphas, john may su to anyone but root and flags are not allowed
john ALPHA = /usr/bin/su [!-]*, !/usr/bin/su *root*
1996-07-24 16:49:18 +00:00
1999-08-22 11:26:23 +00:00
# jen can run anything on all machines except the ones
# in the "SERVERS" Host_Alias
1999-08-22 11:26:23 +00:00
jen ALL, !SERVERS = ALL
# jill can run any commands in the directory /usr/bin/, except for
# those in the SU and SHELLS aliases.
jill SERVERS = /usr/bin/, !SU, !SHELLS
# steve can run any command in the directory /usr/local/op_commands/
# as user operator.
steve CSNETS = (operator) /usr/local/op_commands/
# matt needs to be able to kill things on his workstation when
# they get hung.
matt valkyrie = KILL
# users in the WEBMASTERS User_Alias (will, wendy, and wim)
# may run any command as user www (which owns the web pages)
1999-08-22 11:26:23 +00:00
# or simply su to www.
WEBMASTERS www = (www) ALL, (root) /usr/bin/su www
# anyone can mount/unmount a cd-rom on the machines in the CDROM alias
ALL CDROM = NOPASSWD: /sbin/umount /CDROM,\
/sbin/mount -o nosuid\,nodev /dev/cd0a /CDROM