Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rabbitmqctl does not have to run as root #20

Open
jbg opened this issue Jul 16, 2014 · 1 comment
Open

rabbitmqctl does not have to run as root #20

jbg opened this issue Jul 16, 2014 · 1 comment

Comments

@jbg
Copy link

jbg commented Jul 16, 2014

If you execute the rabbitmqctl executable (usually in /usr/libexec/rabbitmq), rather than the shell script that is usually installed in /usr/sbin, you can run it as the rabbitmq user and avoid having to run your monitoring scripts as root. Here’s a demonstration:

myserver ~ # cd /var/lib/rabbitmq/
myserver rabbitmq # su rabbitmq -s /bin/sh -c "/usr/libexec/rabbitmq/rabbitmqctl -p myvhost list_queues name"
Listing queues ...
amq.gen-Oiq9xZO6FXr3_0oVpS_LEQ
api
celery
celery@api.myserver.celery.pidbox
celery@recurring.myserver.celery.pidbox
recurring
...done.

The monitoring scripts could run as the rabbitmq user and execute the real rabbitmqctl executable without needing to use su.

@dspaeth-faber
Copy link

For all trying this, you have to change HOME within the plugin scripts to match the right place. In this case /var/lib/rabbitmq/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants