CGI Authentication

Yanek Korff ykorff at cigital.com
Wed Oct 15 19:36:24 CEST 2003


I've read:
http://www.nagios.org/faqs/viewfaq.php?faq_id=48
http://nagios.sourceforge.net/docs/1_0/cgiauth.html
http://nagios.sourceforge.net/docs/1_0/configcgi.html

I'm still stumped.  Accessing Nagios through the web interface brings up
pages, but as soon as I try to get useful content, I'm told:

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.

In the top left hand corner of the right frame, it says:
Current Network Status
Last Updated: Wed Oct 15 13:33:48 EDT 2003
Updated every 90 seconds
Nagios(r) - www.nagios.org
Logged in as ykorff

Or if I log in as nagios, it says:
Current Network Status
Last Updated: Wed Oct 15 13:35:20 EDT 2003
Updated every 90 seconds
Nagios(r) - www.nagios.org
Logged in as nagios

Behavior is the same either way.

Running Apache 2.0 on FreeBSD 4.8-STABLE.  HTML root is in
/usr/local/www/nagios/.  CGIs are in /usr/local/www/cgi-bin.nagios/.
Configuration files and snippets are below.  Can anyone spot a problem
and beat me over the head with it?

-Yanek.

Apache config:
<VirtualHost [hostip]>
ServerName nagios.cigital.com
ServerAlias nagios
DocumentRoot /usr/local/www/nagios
ScriptAlias /cgi-bin/ /usr/local/www/cgi-bin.nagios/
<Directory "/usr/local/www/cgi-bin.nagios/">
  AllowOverride AuthConfig
  Options ExecCGI
  Order allow,deny
  Allow from all
</Directory>
</VirtualHost>

.htaccess in both directories:
AuthName "Nagios"
AuthType Basic
AuthUserFile /usr/local/etc/nagios/htpasswd
require valid-user

htpasswd file contains user/pass for users nagios and ykorff

cgi.cfg:
physical_html_path=/usr/local/www/nagios
url_html_path=/
show_context_help=0
nagios_check_command=/usr/local/libexec/nagios/check_nagios
/var/spool/nagios/status.log 5 '/usr/local/bin/nagios'
use_authentication=1
authorized_for_system_information=nagios,ykorff
authorized_for_configuration_information=nagios,ykorff
authorized_for_system_commands=nagios,ykorff
authorized_for_all_services=nagios,ykorff
authorized_for_all_hosts=nagios,ykorff
authorized_for_all_service_commands=nagios,ykorff
authorized_for_all_host_commands=nagios,ykorff
default_statusmap_layout=5
default_statuswrl_layout=4
ping_syntax=/bin/ping -n -U -c 5 $HOSTADDRESS$
refresh_rate=90

nagios.cfg:
log_file=/var/spool/nagios/nagios.log
cfg_dir=/usr/local/etc/nagios/objects.cfg
resource_file=/usr/local/etc/nagios/resource.cfg
status_file=/var/spool/nagios/status.log
nagios_user=nagios
nagios_group=nagios
check_external_commands=0
command_check_interval=-1
command_file=/var/spool/nagios/rw/nagios.cmd
comment_file=/var/spool/nagios/comment.log
downtime_file=/var/spool/nagios/downtime.log
lock_file=/var/spool/nagios/nagios.lock
temp_file=/var/spool/nagios/nagios.tmp
log_rotation_method=d
log_archive_path=/var/spool/nagios/archives
use_syslog=1
log_notifications=1
log_service_retries=1
log_host_retries=1
log_event_handlers=1
log_initial_states=0
log_external_commands=1
log_passive_service_checks=1
inter_check_delay_method=s
service_interleave_factor=s
max_concurrent_checks=0
service_reaper_frequency=10
sleep_time=1
service_check_timeout=60
host_check_timeout=30
event_handler_timeout=30
notification_timeout=30
ocsp_timeout=5
perfdata_timeout=5
retain_state_information=1
state_retention_file=/var/spool/nagios/status.sav
retention_update_interval=60
use_retained_program_state=1
interval_length=60
use_agressive_host_checking=0
execute_service_checks=1
accept_passive_service_checks=1
enable_notifications=1
enable_event_handlers=1
process_performance_data=0
obsess_over_services=0
check_for_orphaned_services=0
check_service_freshness=1
freshness_check_interval=60
aggregate_status_updates=1
status_update_interval=15
enable_flap_detection=0
low_service_flap_threshold=5.0
high_service_flap_threshold=20.0
low_host_flap_threshold=5.0
high_host_flap_threshold=20.0
date_format=us
illegal_object_name_chars=`~!$%^&*|'"<>?,()=
illegal_macro_output_chars=`~$&|'"<>
admin_email=nagios
admin_pager=pagenagios


----------------------------------------------------------------------------
This electronic message transmission contains information that may be
confidential or privileged.  The information contained herein is intended
solely for the recipient and use by any other party is not authorized.  If
you are not the intended recipient (or otherwise authorized to receive this
message by the intended recipient), any disclosure, copying, distribution or
use of the contents of the information is prohibited.  If you have received
this electronic message transmission in error, please contact the sender by
reply email and delete all copies of this message.  Cigital, Inc. accepts no
responsibility for any loss or damage resulting directly or indirectly from
the use of this email or its contents.
Thank You.
----------------------------------------------------------------------------


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
SourceForge.net hosts over 70,000 Open Source Projects.
See the people who have HELPED US provide better services:
Click here: http://sourceforge.net/supporters.php
_______________________________________________
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