Page 1 of 2
Sorry, but you are not authorized to commit the specified co
Posted: Fri Jun 10, 2016 5:07 am
by Francesco
Hi team, on our customer I'm facing an error when I try to schedule a service downtime (picture 1). I'm using NagiosXI (Nagios XI 2014R2.7 ). I obtain the same issue from “Service Status Detail-AdvancedMore Options-See this in Nagios Core” (picture 2). Few times ago this feature worked fine, could you help me in troubleshooting the problem?
Thank you
Francesco
Re: Sorry, but you are not authorized to commit the specifie
Posted: Fri Jun 10, 2016 6:46 am
by Francesco
Hi,
with "nagiosadmin" user only the functionality “Service Status Detail-Advanced-More Options-See this in Nagios Core” it works.
Francesco
Re: Sorry, but you are not authorized to commit the specifie
Posted: Fri Jun 10, 2016 9:20 am
by rkennedy
Can you post your /usr/local/nagios/etc/cgi.cfg file for us to look at? Additionally, what user are you logged in as currently?
Re: Sorry, but you are not authorized to commit the specifie
Posted: Fri Jun 10, 2016 10:18 am
by Francesco
Hi,
below the requested data:
[garufif@nagiosxxx ~]$ ll /usr/local/nagios/etc/cgi.cfg
-rw-r--r-- 1 apache nagios 1309 Jun 10 13:50 /usr/local/nagios/etc/cgi.cfg
[garufif@nagiosxxx ~]$ cat /usr/local/nagios/etc/cgi.cfg
# MODIFIED
default_statusmap_layout=6
# UNMODIFIED
action_url_target=_blank
#authorized_for_all_host_commands=nagiosadmin,nagiosadmin,armando,garufif
#authorized_for_all_hosts=nagiosadmin,nagiosadmin,armando,garufif
#authorized_for_all_service_commands=nagiosadmin,nagiosadmin,armando,garufif
#authorized_for_all_services=nagiosadmin,nagiosadmin,armando,garufif
#authorized_for_configuration_information=nagiosadmin,nagiosadmin,armando,garufif
#authorized_for_system_commands=nagiosadmin,nagiosadmin,armando,garufif
#authorized_for_system_information=nagiosadmin,nagiosadmin,armando,garufif
default_statuswrl_layout=4
escape_html_tags=1
lock_author_names=1
main_config_file=/usr/local/nagios/etc/nagios.cfg
notes_url_target=_blank
physical_html_path=/usr/local/nagios/share
ping_syntax=/bin/ping -n -U -c 5 $HOSTADDRESS$
refresh_rate=15
show_context_help=0
url_html_path=/nagios
use_authentication=1
use_pending_states=1
use_ssl_authentication=0
authorized_for_read_only=user1,user2,user3
On web console I'm logged with "garufif" user (Auth Level Admin).
Thank you
Francesco
Re: Sorry, but you are not authorized to commit the specifie
Posted: Fri Jun 10, 2016 10:37 am
by lmiltchev
Can you run the following commands and show the output?
Code: Select all
ls -lad /usr/local/nagios/var/rw
ls -la /usr/local/nagios/var/rw
grep nag /etc/group
Re: Sorry, but you are not authorized to commit the specifie
Posted: Fri Jun 10, 2016 10:42 am
by Francesco
Hi,
below the requested data:
[garufif@nagiosxxx ~]$ ls -lad /usr/local/nagios/var/rw
drwsr-xr-x 2 nagios nagios 4096 Jun 10 17:16 /usr/local/nagios/var/rw
[garufif@nagiosxxx ~]$ ls -la /usr/local/nagios/var/rw
total 8
drwsr-xr-x 2 nagios nagios 4096 Jun 10 17:16 .
drwxrwxr-x 6 nagios nagios 4096 Jun 10 17:40 ..
prw-rw---- 1 nagios nagios 0 Jun 10 17:16 nagios.cmd
srw-rw---- 1 nagios nagios 0 Jun 10 17:16 nagios.qh
[garufif@nagiosxxx ~]$ grep nag /etc/group
nagcmd

1006:apache,nagios
nagios

1007:apache,nagios
Thank you
Francesco
Re: Sorry, but you are not authorized to commit the specifie
Posted: Fri Jun 10, 2016 10:53 am
by lmiltchev
The only difference I see between your permissions and mine is on the "rw" directory. Yours is not group writable. Try running:
Code: Select all
chmod g+w /usr/local/nagios/var/rw
to see if this is going to solve the issue.
Also, I noticed that all of the lines below in the cgi.cfg file are commented out...
Code: Select all
#authorized_for_all_host_commands=nagiosadmin,nagiosadmin,armando,garufif
#authorized_for_all_hosts=nagiosadmin,nagiosadmin,armando,garufif
#authorized_for_all_service_commands=nagiosadmin,nagiosadmin,armando,garufif
#authorized_for_all_services=nagiosadmin,nagiosadmin,armando,garufif
#authorized_for_configuration_information=nagiosadmin,nagiosadmin,armando,garufif
#authorized_for_system_commands=nagiosadmin,nagiosadmin,armando,garufif
#authorized_for_system_information=nagiosadmin,nagiosadmin,armando,garufif
Have you modified this file manually? Try removing the "#" from all lines and see if this is going to help.
Re: Sorry, but you are not authorized to commit the specifie
Posted: Fri Jun 10, 2016 10:56 am
by Francesco
Hi,
I have attached the picture containing the "Monitoring Engine Status".
Francesco
Re: Sorry, but you are not authorized to commit the specifie
Posted: Fri Jun 10, 2016 10:59 am
by lmiltchev
Please follow the instructions from my previous post and let us know if this solved the issue.
Re: Sorry, but you are not authorized to commit the specifie
Posted: Fri Jun 10, 2016 11:13 am
by Francesco
Hi,
it works!
Thank you
Francesco