Not authorized to commit

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
AlexSavVl
Posts: 38
Joined: Wed Oct 24, 2018 5:50 am

Not authorized to commit

Post by AlexSavVl »

Hello!
Im using nagios XI VMware edition. After upgrading to 5.5.6 I cannot add comments or add|remove acknowledgement. The window just disappears and nothing happens.
I tried to do it in /nagios and got an error:
Sorry, but you are not authorized to commit the specified command.
Read the section of the documentation that deals with authentication and authorization in the CGIs for more information.

Return from whence you came
My login - nagiosadmin


I have tried:

Code: Select all

/usr/local/nagiosxi/scripts/reset_config_perms.sh
Did not help

Code: Select all

# ll /usr/local/nagios/var/rw/
total 0
-rwxrwxrwx 1 root   nagcmd 0 Nov 12 13:22 nagios.cmd
srw-rw---- 1 nagios nagcmd 0 Nov 12 13:24 nagios.qh

Code: Select all

authorized_for_all_host_commands=nagiosadmin,nagiosadmin,nagiosadmin
authorized_for_all_hosts=nagiosadmin,nagiosadmin,guest,nagiosadmin
authorized_for_all_service_commands=nagiosadmin,nagiosadmin,nagiosadmin
authorized_for_all_services=nagiosadmin,nagiosadmin,guest,nagiosadmin
authorized_for_configuration_information=nagiosadmin,nagiosadmin,guest,nagiosadmin
authorized_for_system_commands=nagiosadmin,nagiosadmin,nagiosadmin
authorized_for_system_information=nagiosadmin,nagiosadmin,nagiosadmin

And I didnt found somethin in log files.
AlexSavVl
Posts: 38
Joined: Wed Oct 24, 2018 5:50 am

Re: Not authorized to commit

Post by AlexSavVl »

Tryed under ROOT

Code: Select all

#REMOTE_USER=nagiosadmin REQUEST_METHOD=GET QUERY_STRING="cmd_typ=51&cmd_mod=2&host=ESXI_1" /usr/local/nagios/sbin/cmd.cgi
And get

Code: Select all

<P><DIV CLASS='errorMessage'>Sorry, but you are not authorized to commit the specified command.</DIV></P>
Acknolegement from e-mail works..
Last edited by AlexSavVl on Mon Nov 12, 2018 8:50 am, edited 1 time in total.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Not authorized to commit

Post by scottwilkerson »

This shows something has written to the nagios.cmd file when nagios was stopped and overwrote the permissions

Code: Select all

# ll /usr/local/nagios/var/rw/
total 0
-rwxrwxrwx 1 root   nagcmd 0 Nov 12 13:22 nagios.cmd
srw-rw---- 1 nagios nagcmd 0 Nov 12 13:24 nagios.qh
Lets run the following

Code: Select all

service nagios stop
killall -9 nagios
rm -f /usr/local/nagios/var/rw/nagios.cmd
service nagios start
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
AlexSavVl
Posts: 38
Joined: Wed Oct 24, 2018 5:50 am

Re: Not authorized to commit

Post by AlexSavVl »

I set mod to 777 to allow from all. After restart.

Code: Select all

# ll /usr/local/nagios/var/rw/
total 0
prw-rw---- 1 nagios nagcmd 0 Nov 13 03:01 nagios.cmd
srw-rw---- 1 nagios nagcmd 0 Nov 12 17:47 nagios.qh
#
Still doesnt work.
AlexSavVl
Posts: 38
Joined: Wed Oct 24, 2018 5:50 am

Re: Not authorized to commit

Post by AlexSavVl »

I can remove existing comment from NAGIOS XI, but unable from /nagios (Sorry, but you are not authorized to commit the specified command)
AlexSavVl
Posts: 38
Joined: Wed Oct 24, 2018 5:50 am

SOLVED

Post by AlexSavVl »

Contact and|or template must contain

Code: Select all

can_submit_commands              1
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: SOLVED

Post by scottwilkerson »

AlexSavVl wrote:Contact and|or template must contain

Code: Select all

can_submit_commands              1
Glad to hear you were able to solve the issue

Locking thread
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked