UserName and Password not Working

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.
devilsguest
Posts: 76
Joined: Wed Mar 20, 2013 7:15 pm
Location: New York

UserName and Password not Working

Post by devilsguest »

Can someone let me know why my username and password are not working...Everything is fine and able to see nagios asking me for Id and password but when I enter them it's giving me an error stating "Unrecognized".
MPIvan
Posts: 213
Joined: Thu Nov 22, 2012 6:09 am

Re: UserName and Password not Working

Post by MPIvan »

Look at "/usr/local/nagios/etc/htpasswd.users" to see if htpasswd.users exists if not try the following command to add user
"htpasswd /usr/local/nagios/etc/htpasswd.users <username>" and in the cgi.cfg file see if this is set to 1 "use_authentication=1".

i hope i help if not ... ask again ;)
devilsguest
Posts: 76
Joined: Wed Mar 20, 2013 7:15 pm
Location: New York

Re: UserName and Password not Working

Post by devilsguest »

cgi.cfg is set to 1 and I see the htpasswd.users file in my /etc file. But I don't know where I am going wrong and I typed the password correctly and username also huh this is irritating why don't they work.... :?:


Even I changed the permissions to chmod 755 and still not working if I can figure out this issue then I am all done.....have been trying this since last 3days and couldn't figure out what was going wrong.

do you think Will there be any chages made to my httpd.conf file. I mean any directory permissions

: Command line: '/usr/local/apache2/bin/httpd'
[Mon Mar 25 10:15:25.320560 2013] [auth_basic:error] [pid 15528:tid 3075394480] [ client 172.18.83.116:64254] AH01617: user nagiosadmin: authentication failure for "/nagios/": Password Mismatch
[Mon Mar 25 10:15:30.763311 2013] [auth_basic:error] [pid 15528:tid 3064904624] [ client 172.18.83.116:64255] AH01617: user nagiosadmin: authentication failure for "/nagios/": Password Mismatch
[Mon Mar 25 10:15:36.530593 2013] [auth_basic:error] [pid 15528:tid 3054414768] [ client 172.18.83.116:64257] AH01617: user nagiosadmin: authentication failure for "/nagios/": Password Mismatch
[Mon Mar 25 10:15:46.706929 2013] [auth_basic:error] [pid 15528:tid 3033435056] [ client 172.18.83.116:64258] AH01617: user nagiosadmin: authentication failure for "/nagios/": Password Mismatch
[Mon Mar 25 10:15:51.289434 2013] [auth_basic:error] [pid 15528:tid 3022945200] [ client 172.18.83.116:64258] AH01617: user nagiosadmin: authentication failure for "/nagios/": Password Mismatch
[Mon Mar 25 10:15:57.841720 2013] [auth_basic:error] [pid 15528:tid 3012455344] [ client 172.18.83.116:64259] AH01617: user nagiosadmin: authentication failure for "/nagios/": Password Mismatch
[Mon Mar 25 10:30:41.756395 2013] [mpm_event:notice] [pid 2731:tid 3086117536] A 00494: SIGHUP received. Attempting to restart
[Mon Mar 25 10:30:41.809757 2013] [mpm_event:notice] [pid 2731:tid 3086117536] A 00489: Apache/2.4.4 (Unix) configured -- resuming normal operations
[Mon Mar 25 10:30:41.809802 2013] [core:notice] [pid 2731:tid 3086117536] AH0009 : Command line: '/usr/local/apache2/bin/httpd'
[Mon Mar 25 10:31:13.716897 2013] [auth_basic:error] [pid 17016:tid 3064904624] client 172.18.83.116:64292] AH01617: user nagiosadmin: authentication failure fo "/nagios/": Password Mismatch
[Mon Mar 25 10:32:43.824772 2013] [auth_basic:error] [pid 17016:tid 3033435056] client 172.18.83.116:64346] AH01617: user nagiosadmin: authentication failure fo "/nagios/index.php": Password Mismatch
[Mon Mar 25 10:32:48.754078 2013] [auth_basic:error] [pid 17014:tid 3075394480] client 172.18.83.116:64347] AH01617: user nagiosadmin: authentication failure fo "/nagios/index.php": Password Mismatch
[Mon Mar 25 10:50:02.539943 2013] [mpm_event:notice] [pid 2731:tid 3086117536] A 00494: SIGHUP received. Attempting to restart
[Mon Mar 25 10:50:02.635396 2013] [mpm_event:notice] [pid 2731:tid 3086117536] A 00489: Apache/2.4.4 (Unix) configured -- resuming normal operations
[Mon Mar 25 10:50:02.635462 2013] [core:notice] [pid 2731:tid 3086117536] AH0009 : Command line: '/usr/local/apache2/bin/httpd'
[Mon Mar 25 10:50:12.421456 2013] [mpm_event:notice] [pid 2731:tid 3086117536] A 00491: caught SIGTERM, shutting down
Last edited by slansing on Mon Mar 25, 2013 1:15 pm, edited 1 time in total.
Reason: Please do not double post.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: UserName and Password not Working

Post by abrist »

Well that error is straight forward. You have a password mismatch. Rerun the htpasswd command with the "-c" switch to recreate/overwrite the file:

Code: Select all

htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
devilsguest
Posts: 76
Joined: Wed Mar 20, 2013 7:15 pm
Location: New York

Re: UserName and Password not Working

Post by devilsguest »

Ok...here is the issue i tried creating user name and passwords lot many times but i see the same result. Even i tried the password super simple ones but they don't work...any ways will get back to you....no matter if it works or not

not Working again....Here is the log file

[Mon Mar 25 11:37:49.613490 2013] [auth_basic:error] [pid 23236:tid 3065596848] [client 172.18.83.116:53333] AH01618: user nagioadmin not found: /nagios/index.php
[Mon Mar 25 11:38:34.177237 2013] [auth_basic:error] [pid 23236:tid 3055106992] [client 172.18.83.116:53334] AH01618: user nagioadmin not found: /nagios/index.php
[Mon Mar 25 11:43:26.411680 2013] [mpm_event:notice] [pid 23235:tid 3086809760] AH00494: SIGHUP received. Attempting to restart
[Mon Mar 25 11:43:26.420648 2013] [mpm_event:notice] [pid 23235:tid 3086809760] AH00489: Apache/2.4.4 (Unix) configured -- resuming normal operations
[Mon Mar 25 11:43:26.420681 2013] [core:notice] [pid 23235:tid 3086809760] AH00094: Command line: '/usr/local/apache2/bin/httpd'
[Mon Mar 25 11:43:55.129390 2013] [auth_basic:error] [pid 23878:tid 3065596848] [client 172.18.83.116:53434] AH01617: user nagiosadmin: authentication failure for "/nagios/index.php": Password Mismatch
[Mon Mar 25 11:43:58.235542 2013] [auth_basic:error] [pid 23878:tid 3055106992] [client 172.18.83.116:53434] AH01617: user nagiosadmin: authentication failure for "/nagios/index.php": Password Mismatch
Last edited by slansing on Mon Mar 25, 2013 1:16 pm, edited 1 time in total.
Reason: Please do not double post.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: UserName and Password not Working

Post by abrist »

What does your apache vhost setup for nagios look like? Is it pointing to the right auth file (/usr/local/nagios/etc/htpasswd.users) ?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
devilsguest
Posts: 76
Joined: Wed Mar 20, 2013 7:15 pm
Location: New York

Re: UserName and Password not Working

Post by devilsguest »

Yes
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: UserName and Password not Working

Post by abrist »

Is there another .htpasswd file in your nagios web or share directory?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
devilsguest
Posts: 76
Joined: Wed Mar 20, 2013 7:15 pm
Location: New York

Re: UserName and Password not Working

Post by devilsguest »

yes I have .htpasswd file in share and sbin directories

sorry but the file name is .htaccess

Still looking at 401 unauthorized..... :oops:
Last edited by slansing on Mon Mar 25, 2013 1:16 pm, edited 1 time in total.
Reason: Please do not double post.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: UserName and Password not Working

Post by abrist »

devilsguest wrote:sorry but the file name is .htaccess
.htaccess is right, sorry about that. Do those files point to the right "htpasswd.users" file? Can you post your nagios vhost config and the contents of the .htaccess file in code wraps?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Locked