Page 2 of 2
Re: Sorry, but you are not authorized to commit the specifie
Posted: Mon Jan 23, 2012 3:25 pm
by mguthrie
Can you verify that "check_external_commands"is enabled in the main nagios.cfg file?
Also, try restarting nagios so it recreates the command pipe. That'll make sure it didn't get messed up somehow.
Re: Sorry, but you are not authorized to commit the specifie
Posted: Mon Jan 23, 2012 5:24 pm
by ians
OK, I've been digging through the source code a bit to see if I can get any more ideas. I searched for the error string I was seeing and found this snippet in cmd.c, line 1833:
Code: Select all
else if(authorized == FALSE) {
if(content_type == WML_CONTENT)
printf("<p>Error: You're not authorized to commit that command!</p>\n");
else {
printf("<P><DIV CLASS='errorMessage'>Sorry, but you are not authorized to commit the specified command.</DIV></P>\n");
printf("<P><DIV CLASS='errorDescription'>Read the section of the documentation that deals with authentication and authorization in the CGIs for more information.<BR><BR>\n");
printf("<A HREF='javascript:window.history.go(-2)'>Return from whence you came</A></DIV></P>\n");
}
}
Authentication for the command I was trying to execute (in this case, scheduling host downtime) is referenced here in line 1673:
Code: Select all
temp_host = find_host(host_name);
if(is_authorized_for_host_commands(temp_host, ¤t_authdata) == TRUE)
authorized = TRUE;
It appears that the current_authdata struct is recognized correctly, as the spot on the web form to schedule host downtime correctly populates the Author field with the appropriate username (nagiosadmin).
I have tried changing cgi.cfg to use * in place of nagiosadmin in all of the authorized_for_* statements, and I still saw the permissions error.
I'm not sure how authorized is getting set to FALSE, but that seems to be the core of my problem.
Re: Sorry, but you are not authorized to commit the specifie
Posted: Mon Jan 23, 2012 11:49 pm
by mguthrie
When you access the web interface, does it say you're logged in as 'nagiosadmin', or logged in as '?????'
Re: Sorry, but you are not authorized to commit the specifie
Posted: Tue Jan 24, 2012 1:28 pm
by ians
It says:
Current Network Status
Last Updated: Tue Jan 24 10:26:30 PST 2012
Updated every 90 seconds
Nagios® Core⢠3.2.3 -
http://www.nagios.org
Logged in as nagiosadmin