"Logged in as ?" -- http auth not working ?

Marc Powell marc at ena.com
Wed Sep 13 01:40:14 CEST 2006



> -----Original Message-----
> From: nagios-users-bounces at lists.sourceforge.net [mailto:nagios-users-
> bounces at lists.sourceforge.net] On Behalf Of Rob Ristroph
> Sent: Tuesday, September 12, 2006 1:37 PM
> To: Nagios Users Mailinglist
> Subject: Re: [Nagios-users] "Logged in as ?" -- http auth not working
?
> 
> 
> 
> >>>>> "tom" == tom welsh <tom.welsh at bt.com> writes:
> tom>
> tom> Hi Rob,
> tom> Take a look at "Authentication and authorisation in the CGI's"
> section
> tom> off the docs, or alternatively jump to it from faq F0048. this
solved
> a
> tom> similar problem for me a few years ago.
> 
> I don't see anything in there that I haven't already done.
> 
> My other nagios setups work fine from the web interface.  In fact,
> this one worked fine from the web interface, but has been configured
> and upgraded since it was last known working.  I can't figure out what
> is different now.
> 
> One thing I noticed, is that I have seen several places where it was
> said that the username in the htpasswd.users file had to be the same
> as the name in of a contact.  This is not true in all cases, as I have
> nagios servers set up which have different web login names and the web
> interface works.
> 
> I'm going to have to give up on this for that machine for now, I can't
> spend this much time tracking down something that isn't even giving me
> log messages to debug or anything.

If there are going to be any, they'll be in your web server logs, not
nagios's. It's not a nagios problem. Nagios is depending on your web
server to set the REMOTE_USER environment variable via htaccess. Nagios
(i.e. the CGI's in the sbin directory) just uses that environment
variable to determine who is logged in. If it's not set, you see 'Logged
in as ?' It's that simple. Nagios then takes that username and matches
it against a contact or an authorized_for_* variable in cgi.cfg to
determine what to show.

As I mentioned previously, it seems your authentication for the sbin
(cgi directory) is misconfigured or otherwise broken. You've not
detailed out any of your specific web server configuration information
that I've seen so all I can really say is that you've missed or
misconfigured something. If I recall correctly, you're being prompted to
log in so that means that you likely have mod_access enabled and
configured to prompt for at least one of  /share or /sbin. I'm going to
assume at this point that it's just /share only otherwise you wouldn't
be having this problem.

You can easily test this with a simple php script. If you have php
enabled, create a file named 'user.php' in /usr/local/nagios/share and
/usr/local/nagios/sbin. In the file put the following --

<? 
echo "REMOTE_USER = $REMOTE_USER";
?>

Call the file via your browser with the following URLS --

http://your.nagios.server/nagios/user.php
http://your.nagios.server/nagios/cgi-bin/user.php

You should be prompted to log in and you should see something like
'REMOTE_USER = yourloginname' after successful access.

--
marc

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
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