Guest User

/etc/sudoers.d/scom

a guest
Dec 15th, 2017
106
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #-----------------------------------------------------------------------------------
  2. #Example user configuration for Operations Manager agent
  3. #Example assumes users named: scom-maint & scom-monit
  4. #Replace usernames & corresponding /tmp/scx-<username> specification for your environment
  5.  
  6. #General requirements
  7. Defaults:scom-maint !requiretty
  8. Defaults:scom-monit !requiretty
  9.  
  10. #Agent maintenance
  11.  
  12. ##Certificate signing
  13. scom-maint ALL=(root) NOPASSWD: /bin/sh -c cp /tmp/scx-scom-maint/scx.pem /etc/opt/microsoft/scx/ssl/scx.pem; rm -rf /tmp/scx-scom-maint; /opt/microsoft/scx/bin/tools/scxadmin -restart
  14. scom-maint ALL=(root) NOPASSWD: /bin/sh -c cat /etc/opt/microsoft/scx/ssl/scx.pem
  15.  
  16. ##Install or upgrade
  17. scom-maint ALL=(root) NOPASSWD: /bin/sh -c sh /tmp/scx-scom-maint/scx-1.[5-9].[0-9]-[0-9][0-9][0-9].universal[[\:alpha\:]].[[\:digit\:]].x[6-8][4-6].sh --install; EC=$?; cd /tmp; rm -rf /tmp/scx-scom-maint; exit $EC
  18. scom-maint ALL=(root) NOPASSWD: /bin/sh -c sh /tmp/scx-scom-maint/scx-1.[5-9].[0-9]-[0-9][0-9][0-9].universal[[\:alpha\:]].[[\:digit\:]].x[6-8][4-6].sh --upgrade --force; EC=$?; cd /tmp; rm -rf /tmp/scx-scom-maint; exit $EC
  19.  
  20. ##Uninstall
  21. scom-maint ALL=(root) NOPASSWD: /bin/sh -c /opt/microsoft/scx/bin/uninstall
  22.  
  23. ##Log file monitoring
  24. scom-monit ALL=(root) NOPASSWD: /opt/microsoft/scx/bin/scxlogfilereader -p
  25.  
  26. ##Apache monitoring
  27. scom-monit ALL=(root) NOPASSWD: /opt/microsoft/apache-cimprov/bin/apache_config.sh
  28.  
  29. #End user configuration for Operations Manager agent
  30. #-----------------------------------------------------------------------------------
RAW Paste Data