Nagios CGI authentication woes.

Marc Powell marc at ena.com
Mon Jan 22 22:43:55 CET 2007



> -----Original Message-----
> From: nagios-users-bounces at lists.sourceforge.net [mailto:nagios-users-
> bounces at lists.sourceforge.net] On Behalf Of Peter L. Berghold
> Sent: Monday, January 22, 2007 3:26 PM
> To: nagios Users Mailing List
> Subject: [Nagios-users] Nagios CGI authentication woes.
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hi folks,
> 
> Just put up a new installation of Nagios (version 2.6) and it's not
like
> I haven't done this before so there is obviously something I'm
> overlooking.
> 
> When I set up authentication I did the same things I've done before (I
> think) but it ain't working.  When I try to log in I see in the Apache
> error logs:
> 
> [Mon Jan 22 16:18:26 2007] [error] [client 68.37.227.52] access to
> /nagios/cgi-bin/status.cgi failed, reason: verification of user id
> 'peter' not configured, referer: http://monitor.berghold.net/side.html
> 

[chop]

> The cgi-bin directory (/local/nagios/sbin in my case) has an .htaccess
> file that looks like this:
> 
> - -rw-r--r-- 1 apache root      104 Jan 22 15:58 .htaccess
> 
> permissions wise and has the following contents:
> 
> AuthName "Nagios Access"
> AuthType Basic
> AuthUserFile /local/nagios/etc/nagios.users
> require valid-user

Is that *really* the path to nagios.users? I would expect that to be
/usr/local/nagios/etc/nagios.users. I place my bets here ;)

> 
> The nagios.users file has the requisite userids in it with passwords
> generated by htpasswd.
> 
> I'm baffled at this point. From my experience this should work but it
> isn't.  Is there something I'm overlooking?

Are you using Apache-2.x? I googled for the error and that would appear
to be possible. The auth configuration changed in 2.x from 1.3 --

http://httpd.apache.org/docs/2.2/howto/auth.html

The sample .htaccess file on that page implies that you need something
like --

AuthType Basic
AuthName "Restricted Files"
AuthBasicProvider file
AuthUserFile /local/nagios/etc/nagios.users
Require valid-user

Hope one of those two helps.

--
Marc

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
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