Page 1 of 1
Unable to curl against cmd.cgi
Posted: Fri Feb 10, 2017 1:56 pm
by gavinh
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?
Re: Unable to curl against cmd.cgi
Posted: Fri Feb 10, 2017 2:00 pm
by dwhitfield
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
Re: Unable to curl against cmd.cgi
Posted: Fri Feb 10, 2017 2:01 pm
by rkennedy
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?
Re: Unable to curl against cmd.cgi
Posted: Wed Mar 01, 2017 2:27 pm
by tmcdonald
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?