Advertisement
Guest User

Untitled

a guest
Oct 28th, 2023
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.81 KB | None | 0 0
  1. [root@archlinux ~]# cat /etc/sudoers
  2. ## sudoers file.
  3. ##
  4. ## This file MUST be edited with the 'visudo' command as root.
  5. ## Failure to use 'visudo' may result in syntax or file permission errors
  6. ## that prevent sudo from running.
  7. ##
  8. ## See the sudoers man page for the details on how to write a sudoers file.
  9. ##
  10.  
  11. # Set default EDITOR to restricted version of nano, and do not allow visudo to use EDITOR/VISUAL.
  12. Defaults editor=/usr/bin/rnano, !env_editor
  13.  
  14. ##
  15. ## Host alias specification
  16. ##
  17. ## Groups of machines. These may include host names (optionally with wildcards),
  18. ## IP addresses, network numbers or netgroups.
  19. # Host_Alias WEBSERVERS = www1, www2, www3
  20.  
  21. # Set default EDITOR to restricted version of nano, and do not allow visudo to use EDITOR/VISUAL.
  22. Defaults editor=/usr/bin/rnano, !env_editor
  23.  
  24. ##
  25. ## User alias specification
  26. ##
  27. ## Groups of users. These may consist of user names, uids, Unix groups,
  28. ## or netgroups.
  29. # User_Alias ADMINS = millert, dowdy, mikef
  30.  
  31. ##
  32. ## Cmnd alias specification
  33. ##
  34. ## Groups of commands. Often used to group related commands together.
  35. # Cmnd_Alias PROCESSES = /usr/bin/nice, /bin/kill, /usr/bin/renice, \
  36. # /usr/bin/pkill, /usr/bin/top
  37. # Cmnd_Alias REBOOT = /sbin/halt, /sbin/reboot, /sbin/poweroff
  38.  
  39. ##
  40. ## Defaults specification
  41. ##
  42. ## You may wish to keep some of the following environment variables
  43. ## when running commands via sudo.
  44. ##
  45. ## Locale settings
  46. # Defaults env_keep += "LANG LANGUAGE LINGUAS LC_* _XKB_CHARSET"
  47. ##
  48. ## Run X applications through sudo; HOME is used to find the
  49. ## .Xauthority file. Note that other programs use HOME to find
  50. ## configuration files and this may lead to privilege escalation!
  51. # Defaults env_keep += "HOME"
  52. ##
  53. ## X11 resource path settings
  54. # Defaults env_keep += "XAPPLRESDIR XFILESEARCHPATH XUSERFILESEARCHPATH"
  55. ##
  56. ## Desktop path settings
  57. # Defaults env_keep += "QTDIR KDEDIR"
  58. ##
  59. ## Allow sudo-run commands to inherit the callers' ConsoleKit session
  60. # Defaults env_keep += "XDG_SESSION_COOKIE"
  61. ##
  62. ## Uncomment to enable special input methods. Care should be taken as
  63. ## this may allow users to subvert the command being run via sudo.
  64. # Defaults env_keep += "XMODIFIERS GTK_IM_MODULE QT_IM_MODULE QT_IM_SWITCHER"
  65. ##
  66. ## Uncomment to use a hard-coded PATH instead of the user's to find commands
  67. # Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
  68. ##
  69. ## Uncomment to restore the historic behavior where a command is run in
  70. ## the user's own terminal.
  71. # Defaults !use_pty
  72. ##
  73. ## Uncomment to send mail if the user does not enter the correct password.
  74. # Defaults mail_badpass
  75. ##
  76. ## Uncomment to enable logging of a command's output, except for
  77. ## sudoreplay and reboot. Use sudoreplay to play back logged sessions.
  78. ## Sudo will create up to 2,176,782,336 I/O logs before recycling them.
  79. ## Set maxseq to a smaller number if you don't have unlimited disk space.
  80. # Defaults log_output
  81. # Defaults!/usr/bin/sudoreplay !log_output
  82. # Defaults!/usr/local/bin/sudoreplay !log_output
  83. # Defaults!REBOOT !log_output
  84. # Defaults maxseq = 1000
  85.  
  86. ##
  87. ## Runas alias specification
  88. ##
  89.  
  90. ##
  91. ## User privilege specification
  92. ##
  93. #root ALL=(ALL:ALL) ALL
  94. vincent ALL=(ALL:ALL) ALL
  95.  
  96. ## Uncomment to allow members of group wheel to execute any command
  97. %wheel ALL=(ALL:ALL) ALL
  98.  
  99. ## Same thing without a password
  100. %wheel ALL=(ALL:ALL) NOPASSWD: ALL
  101.  
  102. ## Uncomment to allow members of group sudo to execute any command
  103. %sudo ALL=(ALL:ALL) ALL
  104.  
  105. ## Uncomment to allow any user to run sudo if they know the password
  106. ## of the user they are running the command as (root by default).
  107. # Defaults targetpw # Ask for the password of the target user
  108. # ALL ALL=(ALL:ALL) ALL # WARNING: only use this together with 'Defaults targetpw'
  109.  
  110. ## Read drop-in files from /etc/sudoers.d
  111. @includedir /etc/sudoers.d
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement