Unauthorized login in nagios 4.0.8
-
rafaelbraga
- Posts: 8
- Joined: Thu Sep 18, 2014 12:14 pm
Unauthorized login in nagios 4.0.8
Hi folks,
I installed the nagios 4.0.8 in my ubuntu 10.04 flowing all step that have in this tutorial:
http://assets.nagios.com/downloads/nagi ... Source.pdf
But when I will login in the web interface always appears this mensage:
Unauthorized
This server could not verify that you are authorized to access the document requested. Either you supplied the wrong credentials (e.g., bad password), or your browser doesn't understand how to supply the credentials required.
What may be happening? I hope your help!
Thanks!
I installed the nagios 4.0.8 in my ubuntu 10.04 flowing all step that have in this tutorial:
http://assets.nagios.com/downloads/nagi ... Source.pdf
But when I will login in the web interface always appears this mensage:
Unauthorized
This server could not verify that you are authorized to access the document requested. Either you supplied the wrong credentials (e.g., bad password), or your browser doesn't understand how to supply the credentials required.
What may be happening? I hope your help!
Thanks!
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Unauthorized login in nagios 4.0.8
Are you logging in as the nagiosadmin account? Or did you add an additional account? You need to make sure your use whatever you set up with htpasswd:
Code: Select all
htpasswd –c /usr/local/nagios/etc/htpasswd.users nagiosadmin
-
rafaelbraga
- Posts: 8
- Joined: Thu Sep 18, 2014 12:14 pm
Re: Unauthorized login in nagios 4.0.8
I using the nagiosadmin account and doesn't include another user.
I've changed the password of the nagiosadmin many times. And don't work. :/
I suspect that the problem can be in the permission of the files in the Apache.
I've changed the password of the nagiosadmin many times. And don't work. :/
I suspect that the problem can be in the permission of the files in the Apache.
Re: Unauthorized login in nagios 4.0.8
What version of apache are you running?
Does anything appear in your apache logs?
Does anything appear in your apache logs?
Former Nagios employee
-
rafaelbraga
- Posts: 8
- Joined: Thu Sep 18, 2014 12:14 pm
Re: Unauthorized login in nagios 4.0.8
Version: 2.4.7-1ubuntu4.1
In the five last request of login have:
127.0.0.1 - - [19/Sep/2014:16:25:17 -0300] "GET /nagios HTTP/1.1" 401 691 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/37.0.2062.94 Chrome/37.0.2062.94 Safari/537.36"
127.0.0.1 - nagiosadmin [19/Sep/2014:16:25:24 -0300] "GET /nagios HTTP/1.1" 401 644 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/37.0.2062.94 Chrome/37.0.2062.94 Safari/537.36"
127.0.0.1 - - [19/Sep/2014:16:25:32 -0300] "GET /nagios HTTP/1.1" 401 691 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/37.0.2062.94 Chrome/37.0.2062.94 Safari/537.36"
127.0.0.1 - nagiosadmin [19/Sep/2014:16:25:39 -0300] "GET /nagios HTTP/1.1" 401 644 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/37.0.2062.94 Chrome/37.0.2062.94 Safari/537.36"
127.0.0.1 - - [19/Sep/2014:16:25:41 -0300] "GET /favicon.ico HTTP/1.1" 404 468 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/37.0.2062.94 Chrome/37.0.2062.94 Safari/537.36"
In the five last request of login have:
127.0.0.1 - - [19/Sep/2014:16:25:17 -0300] "GET /nagios HTTP/1.1" 401 691 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/37.0.2062.94 Chrome/37.0.2062.94 Safari/537.36"
127.0.0.1 - nagiosadmin [19/Sep/2014:16:25:24 -0300] "GET /nagios HTTP/1.1" 401 644 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/37.0.2062.94 Chrome/37.0.2062.94 Safari/537.36"
127.0.0.1 - - [19/Sep/2014:16:25:32 -0300] "GET /nagios HTTP/1.1" 401 691 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/37.0.2062.94 Chrome/37.0.2062.94 Safari/537.36"
127.0.0.1 - nagiosadmin [19/Sep/2014:16:25:39 -0300] "GET /nagios HTTP/1.1" 401 644 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/37.0.2062.94 Chrome/37.0.2062.94 Safari/537.36"
127.0.0.1 - - [19/Sep/2014:16:25:41 -0300] "GET /favicon.ico HTTP/1.1" 404 468 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/37.0.2062.94 Chrome/37.0.2062.94 Safari/537.36"
Re: Unauthorized login in nagios 4.0.8
Can you show us the nagios.conf file? I believe on Ubuntu the file should be located in "/etc/apache2/conf.d/" directory.
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
rafaelbraga
- Posts: 8
- Joined: Thu Sep 18, 2014 12:14 pm
Re: Unauthorized login in nagios 4.0.8
Hi,
Follows the contents of the file:
# SAMPLE CONFIG SNIPPETS FOR APACHE WEB SERVER
#
# This file contains examples of entries that need
# to be incorporated into your Apache web server
# configuration file. Customize the paths, etc. as
# needed to fit your system.
ScriptAlias /nagios/cgi-bin "/usr/local/nagios/sbin"
<Directory "/usr/local/nagios/sbin">
# 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 /usr/local/nagios/etc/htpasswd.users
Require valid-user
</Directory>
Alias /nagios "/usr/local/nagios/share"
<Directory "/usr/local/nagios/share">
# SSLRequireSSL
Options None
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 /usr/local/nagios/etc/htpasswd.users
Require valid-user
</Directory>
Follows the contents of the file:
# SAMPLE CONFIG SNIPPETS FOR APACHE WEB SERVER
#
# This file contains examples of entries that need
# to be incorporated into your Apache web server
# configuration file. Customize the paths, etc. as
# needed to fit your system.
ScriptAlias /nagios/cgi-bin "/usr/local/nagios/sbin"
<Directory "/usr/local/nagios/sbin">
# 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 /usr/local/nagios/etc/htpasswd.users
Require valid-user
</Directory>
Alias /nagios "/usr/local/nagios/share"
<Directory "/usr/local/nagios/share">
# SSLRequireSSL
Options None
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 /usr/local/nagios/etc/htpasswd.users
Require valid-user
</Directory>
Re: Unauthorized login in nagios 4.0.8
This looks correct. Run one more time:
and set a simple password (no special chars). Restart apache:
Make sure selinux is disabled:
Stop iptables:
Try to log in the web UI:
BTW, what do you see if you only type the ip in the browsers address bar?
Code: Select all
htpasswd –c /usr/local/nagios/etc/htpasswd.users nagiosadminCode: Select all
service apache2 retartCode: Select all
setenforce 0Code: Select all
service iptables stopCode: Select all
http://<ip address>/nagiosCode: Select all
http://<ip address>Be sure to check out our Knowledgebase for helpful articles and solutions!
-
rafaelbraga
- Posts: 8
- Joined: Thu Sep 18, 2014 12:14 pm
Re: Unauthorized login in nagios 4.0.8
Hi!
Doesn't worked... :/
When I put only my address IP in the browser shows the first page of the RoundCube that is configured in my machine...
Any ideia?
Thanks!
Doesn't worked... :/
When I put only my address IP in the browser shows the first page of the RoundCube that is configured in my machine...
Any ideia?
Thanks!
Re: Unauthorized login in nagios 4.0.8
I will try to recreate the issue in house and will get back to you sometime today.
Be sure to check out our Knowledgebase for helpful articles and solutions!