Password Mismatch

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
rbizzell39
Posts: 112
Joined: Thu Dec 17, 2015 1:24 pm

Password Mismatch

Post by rbizzell39 »

Hello I have nagios 4.24 installed on Centos 7 and I am getting a nagiosadmin authentication failure. I have created the user with the httpasswd. the firewall is open. Here is a copy of my config as well. I am not sure what I am missing.

Code: Select all

[Fri Mar 31 10:06:02.809272 2017] [auth_basic:error] [pid 24157] [client 172.16.5.21:43341] AH01617: user nagiosadmin: authenticati               on failure for "/nagios": Password Mismatch
[Fri Mar 31 10:06:03.341117 2017] [auth_basic:error] [pid 24157] [client 172.16.5.21:43341] AH01617: user nagiosadmin: authenticati               on failure for "/nagios": Password Mismatch
[Fri Mar 31 10:06:03.806695 2017] [auth_basic:error] [pid 24157] [client 172.16.5.21:43341] AH01617: user nagiosadmin: authenticati               on failure for "/nagios": Password Mismatch
[Fri Mar 31 10:06:04.008007 2017] [auth_basic:error] [pid 24157] [client 172.16.5.21:43341] AH01617: user nagiosadmin: authenticati               on failure for "/nagios": Password Mismatch
[Fri Mar 31 10:06:04.207210 2017] [auth_basic:error] [pid 24157] [client 172.16.5.21:43341] AH01617: user nagiosadmin: authenticati               on failure for "/nagios": Password Mismatch
[Fri Mar 31 10:06:04.382820 2017] [auth_basic:error] [pid 24157] [client 172.16.5.21:43341] AH01617: user nagiosadmin: authenticati               on failure for "/nagios": Password Mismatch
[Fri Mar 31 10:06:04.558661 2017] [auth_basic:error] [pid 24157] [client 172.16.5.21:43341] AH01617: user nagiosadmin: authenticati               on failure for "/nagios": Password Mismatch
[Fri Mar 31 10:06:04.756089 2017] [auth_basic:error] [pid 24157] [client 172.16.5.21:43341] AH01617: user nagiosadmin: authenticati               on failure for "/nagios": Password Mismatch
[Fri Mar 31 10:06:04.924492 2017] [auth_basic:error] [pid 24157] [client 172.16.5.21:43341] AH01617: user nagiosadmin: authenticati               on failure for "/nagios": Password Mismatch
[Fri Mar 31 10:06:05.139264 2017] [auth_basic:error] [pid 24157] [client 172.16.5.21:43341] AH01617: user nagiosadmin: authenticati               on failure for "/nagios": Password Mismatch
[Fri Mar 31 10:06:05.502782 2017] [auth_basic:error] [pid 24157] [client 172.16.5.21:43341] AH01617: user nagiosadmin: authenticati               on failure for "/nagios": Password Mismatch
[Fri Mar 31 10:06:05.731651 2017] [auth_basic:error] [pid 24157] [client 172.16.5.21:43341] AH01617: user nagiosadmin: authenticati               on failure for "/nagios": Password Mismatch
[Fri Mar 31 10:06:06.147828 2017] [auth_basic:error] [pid 24157] [client 172.16.5.21:43341] AH01617: user nagiosadmin: authenticati               on failure for "/nagios": Password Mismatch
[Fri Mar 31 10:06:06.512181 2017] [auth_basic:error] [pid 24157] [client 172.16.5.21:43341] AH01617: user nagiosadmin: authenticati               on failure for "/nagios": Password Mismatch
[Fri Mar 31 10:06:10.605995 2017] [auth_basic:error] [pid 24157] [client 172.16.5.21:43341] AH01617: user nagiosadmin: authenticati               on failure for "/nagios": Password Mismatch
[Fri Mar 31 10:06:11.330539 2017] [auth_basic:error] [pid 24157] [client 172.16.5.21:43341] AH01617: user nagiosadmin: authenticati               on failure for "/nagios": Password Mismatch

Code: Select all

<Directory "/usr/lib64/nagios/cgi-bin/">
#  SSLRequireSSL
   Options ExecCGI
   AllowOverride None
   <IfVersion >= 2.3>
      <RequireAll>
         Require all granted
#        Require host 127.0.0.1

         AuthName "Nagios Access"
         AuthType Basic
         AuthUserFile /etc/nagios/passwd
         Require valid-user
      </RequireAll>
   </IfVersion>
   <IfVersion < 2.3>
      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/passwd
      Require valid-user
   </IfVersion>
</Directory>

Alias /nagios "/usr/share/nagios/html"

<Directory "/usr/share/nagios/html">
#  SSLRequireSSL
   Options None
   AllowOverride None
   <IfVersion >= 2.3>
      <RequireAll>
         Require all granted
#        Require host 127.0.0.1

         AuthName "Nagios Access"
         AuthType Basic
         AuthUserFile /etc/nagios/passwd
         Require valid-user
      </RequireAll>
   </IfVersion>
   <IfVersion < 2.3>
      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/passwd
      Require valid-user
   </IfVersion>
</Directory>
I installed through yum I didn't install from source.
Php is working fine

Code: Select all

<Directory /usr/share/phpMyAdmin/>
   AddDefaultCharset UTF-8

   <IfModule mod_authz_core.c>
     # Apache 2.4
     <RequireAny>
       Require ip 172.16.0.0/22
       Require ip ::1
     </RequireAny>
   </IfModule>
   <IfModule !mod_authz_core.c>
     # Apache 2.2
     Order Deny,Allow
     Deny from All
     Allow from 172.16.0.0/22
     Allow from ::1
   </IfModule>
</Directory>

<Directory /usr/share/phpMyAdmin/setup/>
   <IfModule mod_authz_core.c>
     # Apache 2.4
     <RequireAny>
       Require ip 172.16.0.0/22
       Require ip ::1
     </RequireAny>
   </IfModule>
   <IfModule !mod_authz_core.c>
     # Apache 2.2
     Order Deny,Allow
     Deny from All
     Allow from 172.16.0.0/22
     Allow from ::1
   </IfModule>
</Directory>
Last edited by dwhitfield on Fri Mar 31, 2017 9:44 am, edited 1 time in total.
Reason: code blocks FTW
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Password Mismatch

Post by mcapra »

Can you show is the exact htpasswd command you're using? It should be targeting /etc/nagios/passwd based on your apache configs.
Former Nagios employee
https://www.mcapra.com/
Locked