login failed for admin

1,002 views
Skip to first unread message

Sam

unread,
Feb 12, 2015, 11:50:10 AM2/12/15
to th...@googlegroups.com
I've installed naemon on a Ubuntu instance.  The install went well.  The GUI web guy comes up.  But I am not able to login to the web GUI.

I added the admin user:

root@admin1:/var/log/naemon# htpasswd -c /etc/naemon/httpd admin


I tried removing the user and adding it back in but still no luck.


The only helpful entry I found in the logs was:


[2015/02/12 11:38:41][admin1][INFO][Thruk.Controller.remote] started (10215)

[2015/02/12 11:40:12][admin1][INFO][Thruk.Controller.login] login failed for admin on /naemon

[2015/02/12 11:40:18][admin1][INFO][Thruk.Controller.login] login failed for admin on /naemon

[2015/02/12 11:41:23][admin1][INFO][Thruk.Controller.login] login failed for admin on /naemon

[2015/02/12 11:42:17][admin1][INFO][Thruk.Controller.login] login failed for admin on /naemon


Any ideas why I can't login?


TIA

Dru

unread,
Feb 12, 2015, 5:54:09 PM2/12/15
to th...@googlegroups.com
Make sure your Thruk and/or Apache configs point to /etc/naemon/httpd. I forget off the top of my head which one specifically..

Sam

unread,
Feb 18, 2015, 3:33:27 PM2/18/15
to th...@googlegroups.com
Not sure what you mean by Thruk and Apache configs point to /etc/naemon/httpd.  Can you elaborate?   It would be super helpful if you could point me to the Naemon documentation that I missed.

If it helps any, the naemon -v runs cleanly on my instance.

root@admin1:~# /usr/bin/naemon -v /etc/naemon/naemon.cfg 

results in...

Total Warnings: 0
Total Errors:   0

But still I cannot login to the GUI.

TIA.

Dru

unread,
Feb 18, 2015, 6:10:11 PM2/18/15
to th...@googlegroups.com
So you ran:
root@admin1:/var/log/naemon# htpasswd -c /etc/naemon/httpd admin

So /etc/naemon/httpd is your password file.

AuthUserFile in your Apache thruk.conf and htpasswd in your Naemon thruk.*conf need to specify /etc/naemon/httpd.

So if you run:
$ grep -e htpasswd -e AuthUserFile /etc/httpd/conf.d/thruk.conf /etc/naemon/thruk*.conf

You should see something like:
/etc/httpd/conf.d/thruk.conf:    AuthUserFile /etc/naemon/httpd
/etc/naemon/thruk.conf:    htpasswd = /etc/naemon/httpd

/etc/httpd/conf.d/thruk.conf /etc/naemon/thruk*.conf are on RHEL/CentOS. They may differ for Ubuntu.

/etc/naemon/htpasswd also needs to be readable by your Apache user.
$ ls -l /etc/naemon/htpasswd
-rw-r--r-- 1 apache apache 92 Feb 14 18:13 /etc/naemon/htpasswd


Again your Apache user may differ for your system.

Also check the actual password file:

$ cat /etc/naemon/htpasswd
admin
:********************************************


Note I put *'s in place of my password. You should see a hashed password

Let me know how it goes.

Sam

unread,
Feb 19, 2015, 1:29:02 PM2/19/15
to th...@googlegroups.com
I've got AuthUserFile in both files, please note...

root@admin1:~# grep -e htpasswd -e AuthUserFile /etc/apache2/conf-enabled/thruk.conf /etc/naemon/thruk*.conf

/etc/apache2/conf-enabled/thruk.conf:    AuthUserFile /etc/naemon/htpasswd

/etc/naemon/thruk.conf:    htpasswd = /etc/naemon/htpasswd


Also, I'm running apache on Ubuntu, so apache runs as root on this instance.  The permissions on htpasswd are as follows:

root@admin1:~# ls -al /etc/naemon/htpasswd 

-rw-r--r-- 1 root root 20 Feb 17 00:40 /etc/naemon/htpasswd


Anything else you feel like I could be missing?


TIA

Sam

unread,
Feb 19, 2015, 2:14:42 PM2/19/15
to th...@googlegroups.com
I found the following log entry in /var/log/apache2/error.log

[Thu Feb 19 11:48:47.826580 2015] [auth_basic:error] [pid 1213:tid 139737378535168] [client 127.0.0.1:35039] AH01617: user admin: authentication failure for "/naemon/cgi-bin/restricted.cgi": Password Mismatch

[Thu Feb 19 12:53:58.264576 2015] [auth_basic:error] [pid 1212:tid 139737138382592] [client 127.0.0.1:35114] AH01617: user admin: authentication failure for "/naemon/cgi-bin/restricted.cgi": Password Mismatch

Thing is, there is no naemon/cgi-bin/restricted.cgi file on the system.  Should there be?

TIA

Dru

unread,
Feb 19, 2015, 3:24:26 PM2/19/15
to th...@googlegroups.com
I believe thruk does something on the backgroup to reference the cgis. restricted.cgi doesn't' exist on my system. Anyway you get that error when you're using the wrong password... Try recreating the password file.

From my system:

[Thu Feb 19 20:18:15 2015] [error] [client 127.0.0.1] user admin: authentication failure for "/naemon/cgi-bin/restricted.cgi": Password Mismatch

Sam

unread,
Feb 27, 2015, 10:57:04 AM2/27/15
to th...@googlegroups.com
This issue is resolved.  I after entering the login password the page comes up as a failed login.  All I needed to do was place an extra "/" at the end of the URL and the admin interface came up.  

Dru - thanks for your assistance.  
Reply all
Reply to author
Forward
0 new messages