Can't run some of my CGI scripts

Kenneth Durando kdurando at responsebase.com
Tue Jan 20 02:59:17 CET 2004


Greg,

Be sure you check your nagios.cfg config file!!

You MUST have check_external_commands=1 or external commands will not 
work. 

Also, check your cgi.cfg file and be sure you have the proper user 
you have setup with .htaccess that is authorized to run external 
commands. (It appears that you already have this setup).
 
cgi.cfg:
authorized_for_all_service_commands=<.htaccess username>
authorized_for_all_host_commands=<.htaccess username>

Hope this helps,

Kenneth


On Mon, 19 Jan 2004, Greg Cazian wrote:

> I have installed Nagios 1.1 on my Fedora Core 1 system. I have configured everything properly according to the Nagios documentation. But I am getting the following error when trying to run some of the cgi scripts from the web interface:
> 
> It appears as though you do not have permission to view information for any of the hosts you requested... 
> If you believe this is an error, check the HTTP server authentication requirements for accessing this CGI and check the authorization options in your CGI configuration file.
> 
> I have checked everything numerous times that I thought could be the cause of the problem:
> 
> my httpd.conf contains the following:
> 
> ScriptAlias /nagios/cgi-bin/ /usr/local/nagios/sbin/ <Directory "/usr/local/nagios/sbin/">  AllowOverride AuthConfig  Options ExecCGI  Order allow,deny  Allow from all </Directory>
> 
> Alias /nagios/ /usr/local/nagios/share/
> <Directory "/usr/local/nagios/share">
>  Options None
>  AllowOverride AuthConfig
>  Order allow,deny
>  Allow from all
> </Directory>
> 
> I have an .htaccess file in /usr/local/nagios/sbin and /usr/local/nagios/share that contains the following:
> AuthName "Nagios Access"
> AuthType Basic
> AuthUserFile /usr/local/nagios/etc/htpasswd.users
> require valid-user
> 
> 
> My /usr/local/nagios/etc/htpasswd.users file contains an account for user 'greg' and a password. The user greg is also defined in the contacts.cfg file.
> 
> In cgi.cfg, user greg has access to run all cgi scripts. Also, I have use_authentication=1 set.
> 
> [root at myserver /usr/local/nagios/etc]# grep greg * cgi.cfg:authorized_for_system_information=greg
> cgi.cfg:authorized_for_configuration_information=greg
> cgi.cfg:authorized_for_system_commands=greg
> cgi.cfg:authorized_for_all_services=greg
> cgi.cfg:authorized_for_all_hosts=greg
> cgi.cfg:authorized_for_all_service_commands=greg
> cgi.cfg:authorized_for_all_host_commands=greg 
> contactgroups.cfg: members                 greg,nagios
> contacts.cfg: contact_name                    greg
> contacts.cfg: alias                           greg cazian
> contacts.cfg: email                           greg at myserver.mydomain.com
> htpasswd.users:greg:CtKf0yGwVGl.g
> 
> I am being prompted to login to the Nagios web client, and am able to login as greg without problems. The problems arise when I try to run Host Detail, Status Overview, etc.
> 
> 
> -------------------------------------------------------
> The SF.Net email is sponsored by EclipseCon 2004
> Premiere Conference on Open Tools Development and Integration
> See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
> http://www.eclipsecon.org/osdn
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
> ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
> ::: Messages without supporting info will risk being sent to /dev/null
> 



-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list