Skip to content

Commit

Permalink
refactor sudoers easy to see
Browse files Browse the repository at this point in the history
  • Loading branch information
ljblancoredborder committed Apr 22, 2024
1 parent fd280c5 commit a92c0d8
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions resources/templates/default/redborder-manager.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,23 @@ Defaults:redborder !requiretty
Defaults:redborder-monitor !requiretty, !syslog
Defaults:webui !requiretty
Defaults:hadoop !requiretty
redborder ALL= NOPASSWD:SETENV: /usr/lib/redborder/bin/rb_wakeup_chef.sh, /opt/rb/bin/rb_update_geoip, /bin/env BOOTUP=none /usr/lib/redborder/bin/rb_wakeup_chef.sh -c, /bin/env BOOTUP=none /usr/lib/redborder/bin/rb_wakeup_chef.sh -n *, /bin/env BOOTUP=none /usr/lib/redborder/bin/rb_wakeup_chef.sh
redborder-monitor ALL= NOPASSWD: /usr/lib/redborder/bin/rb_get_sensor.sh, /usr/lib/redborder/bin/cachestat.sh, /bin/nice -n 19 /usr/sbin/fping -p 1 -c 10 *, /usr/lib/redborder/bin/rb_mem.sh *
<%# To see it well, I put it in different lines%>
<%="
redborder
ALL= NOPASSWD:SETENV:
/usr/lib/redborder/bin/rb_wakeup_chef.sh,
/opt/rb/bin/rb_update_geoip,
/bin/env BOOTUP=none /usr/lib/redborder/bin/rb_wakeup_chef.sh -c,
/bin/env BOOTUP=none /usr/lib/redborder/bin/rb_wakeup_chef.sh -n *,
/bin/env BOOTUP=none /usr/lib/redborder/bin/rb_wakeup_chef.sh
".gsub(/\s+/, ' ').strip %>
<%="
redborder-monitor
ALL= NOPASSWD:
/usr/lib/redborder/bin/rb_get_sensor.sh,
/usr/lib/redborder/bin/cachestat.sh,
/bin/nice -n 19 /usr/sbin/fping -p 1 -c 10 *,
/usr/lib/redborder/bin/rb_mem.sh *
".gsub(/\s+/, ' ').strip %>
<%="
webui
ALL=NOPASSWD:SETENV:
Expand Down

0 comments on commit a92c0d8

Please sign in to comment.