Guest User

sudoers

a guest
Nov 28th, 2020
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.44 KB | None | 0 0
  1. ## sudoers file.
  2. ##
  3. ## This file MUST be edited with the 'visudo' command as root.
  4. ## Failure to use 'visudo' may result in syntax or file permission errors
  5. ## that prevent sudo from running.
  6. ##
  7. ## See the sudoers man page for the details on how to write a sudoers file.
  8. ##
  9.  
  10.  
  11. ##
  12. ## Host alias specification
  13. ##
  14. ## Groups of machines. These may include host names (optionally with wildcards),
  15. ## IP addresses, network numbers or netgroups.
  16. # Host_Alias WEBSERVERS = www1, www2, www3
  17.  
  18.  
  19. ##
  20. ## User alias specification
  21. ##
  22. ## Groups of users. These may consist of user names, uids, Unix groups,
  23. ## or netgroups.
  24. # User_Alias ADMINS = millert, dowdy, mikef
  25.  
  26.  
  27. ##
  28. ## Cmnd alias specification
  29. ##
  30. ## Groups of commands. Often used to group related commands together.
  31. # Cmnd_Alias PROCESSES = /usr/bin/nice, /bin/kill, /usr/bin/renice, \
  32. # /usr/bin/pkill, /usr/bin/top
  33. # Cmnd_Alias REBOOT = /sbin/halt, /sbin/reboot, /sbin/poweroff
  34.  
  35.  
  36. ##
  37. ## Defaults specification
  38. ##
  39. ## Prevent environment variables from influencing programs in an
  40. ## unexpected or harmful way (CVE-2005-2959, CVE-2005-4158, CVE-2006-0151)
  41. Defaults always_set_home
  42. ## Path that will be used for every command run from sudo
  43. Defaults secure_path="/usr/sbin:/usr/bin:/sbin:/bin"
  44. Defaults env_reset
  45. ## Change env_reset to !env_reset in previous line to keep all environment variables
  46. ## Following list will no longer be nevessary after this change
  47. Defaults env_keep = "LANG LC_ADDRESS LC_CTYPE LC_COLLATE LC_IDENTIFICATION LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER LC_TELEPHONE LC_ATIME LC_ALL LANGUAGE LINGUAS XDG_SESSION_COOKIE"
  48. ## Comment out the preceding line and uncomment the following one if you need
  49. ## to use special input methods. This may allow users to compromise the root
  50. ## account if they are allowed to run commands without authentication.
  51. #Defaults env_keep = "LANG LC_ADDRESS LC_CTYPE LC_COLLATE LC_IDENTIFICATION LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER LC_TELEPHONE LC_ATIME LC_ALL LANGUAGE LINGUAS XDG_SESSION_COOKIE"
  52.  
  53.  
  54. ## Do not insult users when they enter an incorrect password.
  55. Defaults !insults
  56.  
  57.  
  58. ## Uncomment to use a hard-coded PATH instead of the user's to find commands
  59. # Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
  60. ##
  61. ## Uncomment to send mail if the user does not enter the correct password.
  62. # Defaults mail_badpass
  63. ##
  64. ## Uncomment to enable logging of a command's output, except for
  65. ## sudoreplay and reboot. Use sudoreplay to play back logged sessions.
  66. # Defaults log_output
  67. # Defaults!/usr/bin/sudoreplay !log_output
  68. # Defaults!REBOOT !log_output
  69.  
  70.  
  71. ## In the default (unconfigured) configuration, sudo asks for the root password.
  72. ## This allows use of an ordinary user account for administration of a freshly
  73. ## installed system. When configuring sudo, delete the two
  74. ## following lines:
  75. Defaults targetpw # ask for the password of the target user i.e. root
  76. ALL ALL=(ALL) ALL # WARNING! Only use this together with 'Defaults targetpw'!
  77.  
  78.  
  79. ##
  80. ## Runas alias specification
  81. ##
  82.  
  83.  
  84. ##
  85. ## User privilege specification
  86. ##
  87. root ALL=(ALL) ALL
  88.  
  89.  
  90. ## Uncomment to allow members of group wheel to execute any command
  91. # %wheel ALL=(ALL) ALL
  92.  
  93.  
  94. ## Same thing without a password
  95. # %wheel ALL=(ALL) NOPASSWD: ALL
  96.  
  97.  
  98. ## Read drop-in files from /etc/sudoers.d
  99. ## (the '#' here does not indicate a comment)
  100. #includedir /etc/sudoers.d
Advertisement
Add Comment
Please, Sign In to add comment