sudo-sudoers-vine 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. ## Sudoers allows particular users to run various commands as
  2. ## the root user, without needing the root password.
  3. ##
  4. ## Examples are provided at the bottom of the file for collections
  5. ## of related commands, which can then be delegated out to particular
  6. ## users or groups.
  7. ##
  8. ## This file must be edited with the 'visudo' command.
  9. ## Host Aliases
  10. ## Groups of machines. You may prefer to use hostnames (perhaps using
  11. ## wildcards for entire domains) or IP addresses instead.
  12. # Host_Alias FILESERVERS = fs1, fs2
  13. # Host_Alias MAILSERVERS = smtp, smtp2
  14. ## User Aliases
  15. ## These aren't often necessary, as you can use regular groups
  16. ## (ie, from files, LDAP, NIS, etc) in this file - just use %groupname
  17. ## rather than USERALIAS
  18. # User_Alias ADMINS = jsmith, mikem
  19. ## Command Aliases
  20. ## These are groups of related commands...
  21. ## Networking
  22. #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
  23. ## Installation and management of software
  24. #Cmnd_Alias SOFTWARE = /bin/rpm, /usr/bin/apt-get, /usr/bin/smart, /sbin/update-alternatives
  25. ## Services
  26. #Cmnd_Alias SERVICES = /sbin/service, /sbin/chkconfig
  27. ## Updating the locate database
  28. #Cmnd_Alias LOCATE = /usr/bin/updatedb
  29. ## Storage
  30. #Cmnd_Alias STORAGE = /sbin/fdisk, /sbin/sfdisk, /sbin/parted, /sbin/partprobe, /bin/mount, /bin/umount
  31. ## Delegating permissions
  32. #Cmnd_Alias DELEGATING = /usr/sbin/visudo, /bin/chown, /bin/chmod, /bin/chgrp
  33. ## Processes
  34. #Cmnd_Alias PROCESSES = /bin/nice, /bin/kill, /usr/bin/kill, /usr/bin/killall
  35. ## Drivers
  36. #Cmnd_Alias DRIVERS = /sbin/modprobe
  37. # Defaults specification
  38. #
  39. # Disable "ssh hostname sudo <cmd>", because it will show the password in clear.
  40. # You have to run "ssh -t hostname sudo <cmd>".
  41. #
  42. # Defaults requiretty
  43. Defaults env_reset
  44. Defaults env_keep = "COLORS DISPLAY HOSTNAME HISTSIZE INPUTRC KDEDIR LS_COLORS"
  45. Defaults env_keep += "MAIL PS1 PS2 QTDIR USERNAME LANG LC_ADDRESS LC_CTYPE"
  46. Defaults env_keep += "LC_COLLATE LC_IDENTIFICATION LC_MEASUREMENT LC_MESSAGES"
  47. Defaults env_keep += "LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER LC_TELEPHONE"
  48. Defaults env_keep += "LC_TIME LC_ALL LANGUAGE LINGUAS _XKB_CHARSET XAUTHORITY"
  49. Defaults secure_path = /sbin:/bin:/usr/sbin:/usr/bin
  50. Defaults env_editor
  51. ## Other default settings (see sudoers(5))
  52. #Defaults log_host
  53. #Defaults log_input
  54. #Defaults log_output
  55. #Defaults log_year
  56. ## Next comes the main part: which users can run what software on
  57. ## which machines (the sudoers file can be shared between multiple
  58. ## systems).
  59. ## Syntax:
  60. ##
  61. ## user MACHINE=COMMANDS
  62. ##
  63. ## The COMMANDS section may have other options added to it.
  64. ##
  65. ## Allow root to run any commands anywhere
  66. root ALL=(ALL) ALL
  67. ## Allows members of the 'sys' group to run networking, software,
  68. ## service management apps and more.
  69. # %sys ALL = NETWORKING, SOFTWARE, SERVICES, STORAGE, DELEGATING, PROCESSES, LOCATE, DRIVERS
  70. ## Allows people in group wheel to run all commands
  71. # %wheel ALL=(ALL) ALL
  72. %wheel ALL=(ALL) ALL
  73. ## Same thing without a password
  74. # %wheel ALL=(ALL) NOPASSWD: ALL
  75. ## Allows members of the users group to mount and unmount the
  76. ## cdrom as root
  77. # %users ALL=/sbin/mount /mnt/cdrom, /sbin/umount /mnt/cdrom
  78. ## Allows members of the users group to shutdown this system
  79. # %users localhost=/sbin/shutdown -h now
  80. ## Read drop-in files from /etc/sudoers.d (the # here does not mean a comment)
  81. #includedir /etc/sudoers.d