Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
gavinh
Posts: 42 Joined: Wed Apr 08, 2015 4:44 pm
Post
by gavinh » Fri Feb 10, 2017 1:56 pm
I am running this command
Code: Select all
curl -d "cmd_typ=23&cmd_mod=2&host=mobile-u64-1032&btnSubmit=Commit" "http://mobile-mon-02/nagios/cgi-bin/cmd.cgi" -u
I've added my user account to all the cmd.cgi entries for users, authentication - when I run the command I get;
Code: Select all
Sorry, but you are not authorized to commit the specified command.
Any thoughts?
dwhitfield
Former Nagios Staff
Posts: 4583 Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:
Post
by dwhitfield » Fri Feb 10, 2017 2:00 pm
What's the output of the following two commands?
Code: Select all
ls -la /usr/local/nagios/var/rw/nagios.cmd
ls -la /usr/local/nagios/var/rw/
Also, could you look in /etc/group and note what users are a part of group 'nagioscmd'
Here is what mine looks like, albeit form a very vanilla test set up:
nagioscmd
119:nagios,www-data
rkennedy
Posts: 6579 Joined: Mon Oct 05, 2015 11:45 am
Post
by rkennedy » Fri Feb 10, 2017 2:01 pm
Please post your entire cgi.cfg for us to review, and also the host definition of mobile-u64-1032 - it looks like the user may not have the proper rights to submit the command from what I can tell.
Also, whati s the user you're attempting to do this as?
Former Nagios Employee
tmcdonald
Posts: 9117 Joined: Mon Sep 23, 2013 8:40 am
Post
by tmcdonald » Wed Mar 01, 2017 2:27 pm
Just checking in since we have not heard from you in a while. Did
@rkennedy 's post clear things up or has the issue otherwise been resolved?
Former Nagios employee