CGI Authoristaion problem (and yes I have read the FAQ)

Patrick Ouellet pouellet at microtecsecurite.com
Thu Dec 11 16:28:11 CET 2003


I have a simmilar problem.

When I try to access the CGIs I am asked for a
user/pass but anything I enter get refused and
the prompt come back until I hit cancel,
then I get authorization required page. (401)

/*
  This server could not verify that you are authorized to access the URL
"/nagios/cgi-bin/status.cgi". You either supplied the wrong credentials
(e.g., bad password), or your browser doesn't understand how to supply
the credentials required.
*/

I know I supplied good credential.. and I don't think mozilla and IE
can't understand how to suopply credentials...


Im running:

Apache 2.0.40
Nagios 1.1
Nagios Plugins 1.3.1

Here is my apache config

ScriptAlias /nagios/cgi-bin/ "/usr/local/nagios/sbin/"
<Directory /usr/local/nagios/sbin>
         AllowOverride AuthConfig
         order allow,deny
         allow from all
         Options ExecCGI
</Directory>

Alias /nagios/ /usr/local/nagios/share/
<Directory "/usr/local/nagios/share">
         Options None
         AllowOverride AuthConfig
         Order allow,deny
         Allow from all
</Directory>

I added the .htaccess file to the sbin and share directory

AuthName "Nagios Access"
AuthType Basic
AuthUserFile /usr/local/nagios/etc/htpasswd.users
require valid-user

I also added two users to the htpasswd.users file
nagiosadmin & pouellet

pouellet is part of all contact groups.

pouellet is also authorized_for all options in cgi.cfg
under authorisation

Did I forgot something?

PS: I tried using no authentification (its a secure web server)
then I can access the cgi but I can't do anything...
( launch command, re-schedule check...) and I know its normal...


Thanx to everyone on the list !


Stephen Patterson wrote:

> Hi all
> I've just recently installed nagios and am having a problem accessing 
> the CGI reports when logged in as the default nagiosadmin user, all the 
> CGIs report that I don't have permission to access them.
> 
> I've checked the authentication options referred to in FAQ 0048, and 
> they all appear OK.  I've also added the nagiosadmin user to all of my 
> contact groups.  Everything else appears to work jsut fine: my hosts are 
> monitored to a database, and there are no errors in either the Apache or 
> the Nagios log files.
> 
> This is the apache config I'm using.
> <DirectoryMatch /usr/lib/cgi-bin/nagios/>
>       Options ExecCGI
> 
>       AllowOverride AuthConfig
>       Order Allow,Deny
>       Allow From All
> 
>       AuthName "Nagios Access"
>       AuthType Basic
>       AuthUserFile /etc/nagios/htpasswd.users
>       require valid-user
> </DirectoryMatch>
> 
> Alias /netsaint /usr/share/nagios/htdocs/
> Alias /nagios /usr/share/nagios/htdocs/
> <DirectoryMatch /usr/share/nagios/htdocs/>
>       Options FollowSymLinks
> 
>       AllowOverride AuthConfig
>       Order Allow,Deny
>       Allow From All
> 
>       AuthName "Nagios Access"
>       AuthType Basic
>       AuthUserFile /etc/nagios/htpasswd.users
>       require valid-user
> </DirectoryMatch>
> 
> Does anyone have any suggestions?
> 
> 
> ________________________________________________________________________
> CJ GARLAND & CO LIMITED DISCLAIMER
> 

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Patrick Ouellet - pouellet at microtecsecurite.com
Administrateur des serveurs reseaux
Informatique - Poste 130
Microtec Technologies inc.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
"First they ignore you. Then they laugh at you.
Then they fight you. Then you win."
-Mahatma Gandhi
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=





-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
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