Page 1 of 1

Not authorized to commit

Posted: Mon Nov 12, 2018 5:35 am
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.

Re: Not authorized to commit

Posted: Mon Nov 12, 2018 6:53 am
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..

Re: Not authorized to commit

Posted: Mon Nov 12, 2018 11:02 am
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

Re: Not authorized to commit

Posted: Tue Nov 13, 2018 12:58 am
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.

Re: Not authorized to commit

Posted: Tue Nov 13, 2018 3:03 am
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)

SOLVED

Posted: Tue Nov 13, 2018 5:55 am
by AlexSavVl
Contact and|or template must contain

Code: Select all

can_submit_commands              1

Re: SOLVED

Posted: Tue Nov 13, 2018 10:46 am
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