Advertisement
niwo

/etc/sudoers.d/template

Dec 14th, 2019
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.80 KB | None | 0 0
  1. # Host alias specification
  2.  
  3. # User alias specification
  4. User_Alias ADMINS = nas
  5.  
  6. # Cmnd alias specification
  7. Cmnd_Alias SHUTDOWN =   /sbin/halt, /sbin/shutdown, /sbin/poweroff, /sbin/reboot, /bin/systemctl, \
  8.                         /sbin/init, /bin/systemd, /lib/systemd/systemd, /dev/initctl
  9.  
  10. # User privilege specification
  11. #nas    ALL=(ALL) NOPASSWD: /sbin/poweroff, /sbin/reboot, /sbin/shutdown, /dev/initctl
  12. #nas    ALL=NOPASSWD: /sbin/halt, /sbin/reboot, /sbin/poweroff, /sbin/shutdown, /dev/initctl
  13.  
  14. ADMINS  ALL=(ALL:ALL) ALL, NOPASSWD: SHUTDOWN
  15.  
  16. # Members of the admin group may gain root privileges
  17. %admin  ALL=(ALL:ALL) ALL, NOPASSWD: SHUTDOWN
  18. %adm    ALL=(ALL:ALL) NOPASSWD: SHUTDOWN
  19. %nas    ALL=(ALL:ALL) NOPASSWD: SHUTDOWN
  20.  
  21. # Allow members of group sudo to execute any command
  22. %sudo   ALL=(ALL:ALL) ALL, NOPASSWD: SHUTDOWN
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement