Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Using Fedora
FedoraForum Search

Forgot Password? Join Us!

Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 8th July 2009, 08:46 PM
michael12345 Offline
Registered User
 
Join Date: Nov 2008
Posts: 186
nagios 401, will not accept username password. [SOLVED]

I'm getting a 401 error from nagios when I browse to http://localhost/nagios.
"A username and password are being requested by http://localhost. The site says: "nagios""

I used the following command to set the password
# htpasswd -cs /etc/nagios/htpasswd.users nagiosadmin
Have also tried without the htpasswd file and with only the -c option

I installed from the rpm in the repo

office nagios]# service httpd status
httpd (pid 5978) is running...

office nagios]# service nagios status
nagios (pid 6016) is running...

Any thoughts? I've read through the Max Hendrick guide at Cent and googled, seems a few people have run into this before.
Reply With Quote
  #2  
Old 8th July 2009, 10:12 PM
michael12345 Offline
Registered User
 
Join Date: Nov 2008
Posts: 186
Solved.

I used the following command to set the password
# htpasswd -cs /etc/nagios/htpasswd.users nagiosadmin
Have also tried without the htpasswd file and with only the -c option

Fixed, instructions say use htpasswd.users, however in /etc/httpd/conf.d it looks for /etc/nagios/passwd.

Documentation flaw.
Reply With Quote
  #3  
Old 8th July 2009, 10:25 PM
scottro's Avatar
scottro Offline
Retired Community Manager -- Banned from Texas by popular demand.
 
Join Date: Sep 2007
Location: NYC
Posts: 8,142
Hrrm, I see my notes, which were based on Max's tutorial, say /etc/nagios/passwd. You mean the nagios docs themselves are wrong? I've always found them pretty horrible, actually, read them for a few days and got nowhere till I found Max's stuff.

Others of course, will tell you they're great, but they probably all have CS degrees.
__________________
--
http://home.roadrunner.com/~computertaijutsu

Do NOT PM forum members with requests for technical support. Ask your questions on the forum.


"I don't know why there is the constant push to break any semblance of compatibility" --anon
Reply With Quote
  #4  
Old 8th July 2009, 10:29 PM
michael12345 Offline
Registered User
 
Join Date: Nov 2008
Posts: 186
Quote:
Originally Posted by scottro View Post
Hrrm, I see my notes, which were based on Max's tutorial, say /etc/nagios/passwd. You mean the nagios docs themselves are wrong? I've always found them pretty horrible, actually, read them for a few days and got nowhere till I found Max's stuff.

Others of course, will tell you they're great, but they probably all have CS degrees.
Quote:
http://www.maxsworld.org/index.php/how-tos/nagios
Unless you want other options such as SSL configurations or allowing access to the CGI from only certain hosts, then the default nagios.conf file will suit your needs. You can find the file in /etc/httpd/conf.d/ Here’s what it looks like:

ScriptAlias /nagios/cgi-bin "/usr/lib/nagios/cgi"
<Directory "/usr/lib/nagios/cgi">
# SSLRequireSSL
Options ExecCGI
AllowOverride None
Order allow,deny
Allow from all
# Order deny,allow
# Deny from all
# Allow from 127.0.0.1
AuthName "Nagios Access"
AuthType Basic
AuthUserFile /etc/nagios/htpasswd.users
Require valid-user
</Directory>


[me@mymachine ~] htpasswd -c /etc/nagios/htpasswd.users nagiosadmin
New password: type_your_password
Re-type new password: re-type_your_password
Adding password for user nagiosadmin


Quote:
http://nagios.sourceforge.net/docs/3...rt-fedora.html
htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin
Respectfully, both are wrong, per my install on FC11 based on RPM, I can not comment on any other scenarios accurately.
Reply With Quote
  #5  
Old 8th July 2009, 10:50 PM
scottro's Avatar
scottro Offline
Retired Community Manager -- Banned from Texas by popular demand.
 
Join Date: Sep 2007
Location: NYC
Posts: 8,142
My bad, I misread my notes. I have users, which works on a CentOS server. Fedora is using nagios 3, CentOS is using nagios 2.

RedHat's policy is to not update programs that have configuration file changes, for the very good reason that if you update, and suddenly nagios (or whatever the program is) starts throwing errors, you're probably in trouble, since the chances are that's a system in production.

The sad thing is that I would wager that nine times out of ten, the changes in configuration files are simply lazy programming. Getmail is a special case, it was completely redone, but most of the time, it's some stupid little change. For example, one wonders what is the difference between the two names. Although the new name actually probably makes more sense, so, I dunno. Their Fedora docs are obviously not up to date. (Though their RH ones apparently are.)
__________________
--
http://home.roadrunner.com/~computertaijutsu

Do NOT PM forum members with requests for technical support. Ask your questions on the forum.


"I don't know why there is the constant push to break any semblance of compatibility" --anon
Reply With Quote
  #6  
Old 8th July 2009, 10:58 PM
michael12345 Offline
Registered User
 
Join Date: Nov 2008
Posts: 186
Quote:
Originally Posted by scottro View Post
My bad, I misread my notes. I have users, which works on a CentOS server. Fedora is using nagios 3, CentOS is using nagios 2.

RedHat's policy is to not update programs that have configuration file changes, for the very good reason that if you update, and suddenly nagios (or whatever the program is) starts throwing errors, you're probably in trouble, since the chances are that's a system in production.

The sad thing is that I would wager that nine times out of ten, the changes in configuration files are simply lazy programming. Getmail is a special case, it was completely redone, but most of the time, it's some stupid little change. For example, one wonders what is the difference between the two names. Although the new name actually probably makes more sense, so, I dunno. Their Fedora docs are obviously not up to date. (Though their RH ones apparently are.)
Two questions, can you add a solved to my title in case someone else searches for a similar issue. And which docs would you recommend for adding hosts where communication is via ssh?
Reply With Quote
  #7  
Old 9th July 2009, 12:47 AM
scottro's Avatar
scottro Offline
Retired Community Manager -- Banned from Texas by popular demand.
 
Join Date: Sep 2007
Location: NYC
Posts: 8,142
Sure, I'll mark it solved.

Really, I've done everything using Max's various tutorials, so not sure how much it will have changed for F11/nagios 3.
I always added hosts by editing hosts.cfg, which can easily be done through ssh, so I suspect I'm misunderstanding the question.
__________________
--
http://home.roadrunner.com/~computertaijutsu

Do NOT PM forum members with requests for technical support. Ask your questions on the forum.


"I don't know why there is the constant push to break any semblance of compatibility" --anon
Reply With Quote
  #8  
Old 9th July 2009, 01:42 AM
michael12345 Offline
Registered User
 
Join Date: Nov 2008
Posts: 186
Quote:
Originally Posted by scottro View Post
Sure, I'll mark it solved.

Really, I've done everything using Max's various tutorials, so not sure how much it will have changed for F11/nagios 3.
I always added hosts by editing hosts.cfg, which can easily be done through ssh, so I suspect I'm misunderstanding the question.
Sorry, I mean that hosts needed to communicate over ssh. It's my understanding that they can do it via SSH or NRPE.

--paranoid penguin

--edit, I may be misunderstanding the documentation. All the computers I need to monitor I can execute almost anything I want on. I just want the checks to occur over ssh

Last edited by michael12345; 9th July 2009 at 02:04 AM.
Reply With Quote
  #9  
Old 9th July 2009, 02:47 AM
scottro's Avatar
scottro Offline
Retired Community Manager -- Banned from Texas by popular demand.
 
Join Date: Sep 2007
Location: NYC
Posts: 8,142
Hrrm.. I use a variety of protocols, depending upon what I'm monitoriing--on some it's just a ping, on a mail server it's smtp, on a web server http.

I don't think I use nrpe, I'll have to check tomorrow.
__________________
--
http://home.roadrunner.com/~computertaijutsu

Do NOT PM forum members with requests for technical support. Ask your questions on the forum.


"I don't know why there is the constant push to break any semblance of compatibility" --anon
Reply With Quote
Reply

Tags
401, accept, nagios, password, solved, username

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
No username or password nijltjetweety Installation and Live Media 5 10th August 2008 02:23 PM
Printer Config - Won't accept password? Mertahn Using Fedora 5 31st July 2008 07:34 AM
Username and password Charolles Installation and Live Media 6 25th July 2007 06:41 PM


Current GMT-time: 02:13 (Saturday, 25-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat