Nagios CGI authentication woes.

Andreas Ericsson ae at op5.se
Tue Jan 23 15:49:44 CET 2007


Jay Chandler wrote:
> Marc Powell wrote:
>>   
>>> -----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 ;)
> I'd go one further and bet it's /usr/local/nagios/etc/nagios/users.
> 

I put my money with

htaccess=$(find /usr/local -type f -name .htaccess)
path_to=$(find /usr/local -type f -name "*users")
sed -i "s/\\(AuthUserFile \\).*/\1 $path_to/" $htaccess

-- 
Andreas Ericsson                   andreas.ericsson at op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231

-------------------------------------------------------------------------
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