Advertisement
Guest User

Untitled

a guest
Aug 18th, 2017
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.75 KB | None | 0 0
  1. ## Next comes the main part: which users can run what software on
  2. ## which machines (the sudoers file can be shared between multiple
  3. ## systems).
  4. ## Syntax:
  5. ##
  6. ## user MACHINE=COMMANDS
  7. ##
  8. ## The COMMANDS section may have other options added to it.
  9. ##
  10. ## Allow root to run any commands anywhere
  11. root ALL=(ALL) ALL
  12. test ALL=(ALL) ALL
  13.  
  14. [root@ark-centos-smb4 ~]# groups test
  15. test : bin wheel arkgrp
  16.  
  17. [root@ark-centos-smb4 ~]# su - test
  18. Last login: Tue Aug 8 01:03:48 PDT 2017 on pts/0
  19. [test@ark-centos-smb4 ~]$ sudo ls /root/
  20. [sudo] password for test:
  21. test is not in the sudoers file. This incident will be reported.
  22.  
  23. [root@ark-centos-smb4 ~]# sudo ls
  24. root is not allowed to run sudo on ark-centos-smb4. This incident will be reported.
  25.  
  26. [root@ark-centos-smb4 ~]# visudo -c
  27. /etc/sudoers: parsed OK
  28. /etc/sudoers.d/arkgrp-users: parsed OK
  29.  
  30. [root@ark-centos-smb4 ~]# sudo -V
  31. Sudo version 1.8.6p7
  32. Configure options: --build=x86_64-redhat-linux-gnu --host=x86_64-redhat-linux-gnu --program-prefix= --disable-dependency-tracking --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/var/lib --mandir=/usr/share/man --infodir=/usr/share/info --prefix=/usr --sbindir=/usr/sbin --libdir=/usr/lib64 --docdir=/usr/share/doc/sudo-1.8.6p7 --with-logging=syslog --with-logfac=authpriv --with-pam --with-pam-login --with-editor=/bin/vi --with-env-editor --with-ignore-dot --with-tty-tickets --with-ldap --with-ldap-conf-file=/etc/sudo-ldap.conf --with-selinux --with-passprompt=[sudo] password for %p: --with-linux-audit --with-sssd --with-gcrypt
  33. Sudoers policy plugin version 1.8.6p7
  34. Sudoers file grammar version 42
  35.  
  36. Sudoers path: /etc/sudoers
  37. nsswitch path: /etc/nsswitch.conf
  38. ldap.conf path: /etc/sudo-ldap.conf
  39. ldap.secret path: /etc/ldap.secret
  40. Authentication methods: 'pam'
  41. Syslog facility if syslog is being used for logging: authpriv
  42. Syslog priority to use when user authenticates successfully: notice
  43. Syslog priority to use when user authenticates unsuccessfully: alert
  44. Ignore '.' in $PATH
  45. Send mail if the user is not in sudoers
  46. Use a separate timestamp for each user/tty combo
  47. Lecture user the first time they run sudo
  48. Require users to authenticate by default
  49. Root may run sudo
  50. Allow some information gathering to give useful error messages
  51. Visudo will honor the EDITOR environment variable
  52. Set the LOGNAME and USER environment variables
  53. Length at which to wrap log file lines (0 for no wrap): 80
  54. Authentication timestamp timeout: 5.0 minutes
  55. Password prompt timeout: 5.0 minutes
  56. Number of tries to enter a password: 3
  57. Umask to use or 0777 to use user's: 022
  58. Path to mail program: /usr/sbin/sendmail
  59. Flags for mail program: -t
  60. Address to send mail to: root
  61. Subject line for mail messages: *** SECURITY information for %h ***
  62. Incorrect password message: Sorry, try again.
  63. Path to authentication timestamp dir: /var/db/sudo
  64. Default password prompt: [sudo] password for %p:
  65. Default user to run commands as: root
  66. Path to the editor for use by visudo: /bin/vi
  67. When to require a password for 'list' pseudocommand: any
  68. When to require a password for 'verify' pseudocommand: all
  69. File descriptors >= 3 will be closed before executing a command
  70. Reset the environment to a default set of variables
  71. Environment variables to check for sanity:
  72. TZ
  73. TERM
  74. LINGUAS
  75. LC_*
  76. LANGUAGE
  77. LANG
  78. COLORTERM
  79. Environment variables to remove:
  80. RUBYOPT
  81. RUBYLIB
  82. PYTHONUSERBASE
  83. PYTHONINSPECT
  84. PYTHONPATH
  85. PYTHONHOME
  86. TMPPREFIX
  87. ZDOTDIR
  88. READNULLCMD
  89. NULLCMD
  90. FPATH
  91. PERL5DB
  92. PERL5OPT
  93. PERL5LIB
  94. PERLLIB
  95. PERLIO_DEBUG
  96. JAVA_TOOL_OPTIONS
  97. SHELLOPTS
  98. GLOBIGNORE
  99. PS4
  100. BASH_ENV
  101. ENV
  102. TERMCAP
  103. TERMPATH
  104. TERMINFO_DIRS
  105. TERMINFO
  106. _RLD*
  107. LD_*
  108. PATH_LOCALE
  109. NLSPATH
  110. HOSTALIASES
  111. RES_OPTIONS
  112. LOCALDOMAIN
  113. CDPATH
  114. IFS
  115. Environment variables to preserve:
  116. XAUTHORIZATION
  117. XAUTHORITY
  118. PS2
  119. PS1
  120. PATH
  121. LS_COLORS
  122. KRB5CCNAME
  123. HOSTNAME
  124. DISPLAY
  125. COLORS
  126. Locale to use while parsing sudoers: C
  127. Compress I/O logs using zlib
  128. Directory in which to store input/output logs: /var/log/sudo-io
  129. File in which to store the input/output log: %{seq}
  130. Add an entry to the utmp/utmpx file when allocating a pty
  131. Don't pre-resolve all group names
  132. PAM service name to use
  133. PAM service name to use for login shells
  134.  
  135. Local IP address and netmask pairs:
  136. 192.168.32.26/255.255.252.0
  137. 2001:21:21:32:250:56ff:feb4:720d/ffff:ffff:ffff:ffff::
  138. fe80::250:56ff:feb4:720d/ffff:ffff:ffff:ffff::
  139.  
  140. Sudoers I/O plugin version 1.8.6p7
  141.  
  142. Defaults !visiblepw
  143.  
  144. Defaults always_set_home
  145.  
  146. Defaults env_reset
  147. Defaults env_keep = "COLORS DISPLAY HOSTNAME HISTSIZE KDEDIR LS_COLORS"
  148. Defaults env_keep += "MAIL PS1 PS2 QTDIR USERNAME LANG LC_ADDRESS LC_CTYPE"
  149. Defaults env_keep += "LC_COLLATE LC_IDENTIFICATION LC_MEASUREMENT LC_MESSAGES"
  150. Defaults env_keep += "LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER LC_TELEPHONE"
  151. Defaults env_keep += "LC_TIME LC_ALL LANGUAGE LINGUAS _XKB_CHARSET XAUTHORITY"
  152.  
  153. Defaults secure_path = /sbin:/bin:/usr/sbin:/usr/bin
  154.  
  155. root ALL=(ALL:ALL) ALL
  156. test ALL=(ALL:ALL) ALL
  157. usera ALL=(ALL:ALL) ALL
  158.  
  159. %wheel ALL=(ALL) ALL
  160.  
  161. ## Read drop-in files from /etc/sudoers.d (the # here does not mean a comment)
  162. #includedir /etc/sudoers.d
  163.  
  164. %arkgrp ALL=(ALL) ALL
  165.  
  166. # User privilege specification
  167. root ALL=(ALL:ALL) ALL
  168. test ALL=(ALL:ALL) ALL
  169.  
  170. # Allow members of group sudo to execute any command
  171. %sudo ALL=(ALL:ALL) ALL
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement