Skip to content

Instantly share code, notes, and snippets.

@binford2k
Last active December 24, 2015 16:29
Show Gist options
  • Save binford2k/6828918 to your computer and use it in GitHub Desktop.
Save binford2k/6828918 to your computer and use it in GitHub Desktop.
# /etc/mcollective/policies/service.policy
# The file is active, because if I change this to allow, then actions are allowed
policy default deny
# but this line doesn't work. These are hard tabs.
allow * restart *
#######
[root@classroom ~]# service pe-mcollective restart
Shutting down pe-mcollective: [ OK ]
Starting pe-mcollective: [ OK ]
[root@classroom ~]# sudo -i -u peadmin mco service ntp restart
Do you really want to operate on services unfiltered? (y/n): y
* [ ============================================================> ] 1 / 1
classroom.puppetlabs.vm: You are not authorized to call this agent or action.
Summary of Service Status:
unknown = 1
Finished processing 1 / 1 hosts in 110.99 ms
#########
Solved by reading code. The "optional" fifth column is not optional.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment