Page 2 of 2

Re: Backend login to the Core Config Manager failed

Posted: Mon Feb 11, 2013 5:14 pm
by pteegarden
I recognize the database credentials in /var/www/html/nagiosql/config/settings.php to be the ones that I set.
Here is the contents of that file (with password removed).

<?php

exit;
;
?>

;

; Nagios CCM. Based on NagiosQL (c) 2008, 2009 by Martin Willisegger

[db]

server = localhost

port = 3306

database = nagiosql

username = nagiosql

password = XxXxXxXxXx

[common]

install = passed



The /usr/local/nagiosxi/html/config.inc.php file contains these four userid/password sections, below.


"pnp" => array(
"perfdata_dir" => "/usr/local/nagios/share/perfdata",
"share_dir" => "/usr/local/nagios/share/pnp",
"direct_url" => "/nagios/pnp",
"username" => 'nagiosxi', // don't change this!
"password" => 'nagiosadmin', // this gets reset when security credentials are reset after installation
),
"nagiosql" => array(
"dir" => "/var/www/html/nagiosql",
"direct_url" => "/nagiosql",
"username" => 'nagiosxi', // don't change this!
"password" => 'n@gweb', // this gets reset when security credentials are reset after installation
),
"nagvis" => array(
"share_dir" => "/usr/local/nagios/share/nagvis",
"direct_url" => "/nagios/nagvis",
"username" => 'nagiosadmin', // don't change this!
"password" => 'nagiosadmin', // this gets reset when security credentials are reset after installation
),

and, further down in that file,

// HTTP BASIC AUTHENTICATION INFO -- USED BY SUBSYSTEM
$cfg['use_basic_authentication']=false; // is HTTP Basic authentication being used? if so, set the two variables below...
$cfg['subsystem_basic_auth_username']='nagiosxi'; // subsystem credentials
$cfg['subsystem_basic_auth_password']='somepassword';


I would make the assumption that the username does not match (nagiosxi -vs- nagiosql), and, none of the passwords match "XxXxXxXxXx"

Re: Backend login to the Core Config Manager failed

Posted: Mon Feb 11, 2013 5:31 pm
by scottwilkerson
Correct, this would be what you want

Code: Select all

"nagiosql" => array(
                "dbtype" => 'mysql',
                "dbserver" => 'localhost',
                "user" => 'nagiosql',
                "pwd" => 'n@gweb',
                "db" => 'nagiosql',

Re: Backend login to the Core Config Manager failed

Posted: Mon Feb 11, 2013 5:43 pm
by lmiltchev
To add to what scottwilkerson had to say - this is in the "// db-specific connection information" section. What you were showing is in the "// component info" section.

Please, check it out.

Also, try the following:

Go to Admin->Reset Security Credentials->Update Credentials (Don't change anything in the "Sub-System Credentials" section)

Let me know if this helped.

Re: Backend login to the Core Config Manager failed

Posted: Mon Feb 11, 2013 6:42 pm
by pteegarden
Yes, thanks for the clairification, I quoted the usernames/passwords in the "// component info" section", not the ones in "// db-specific connection information".

I missed that because the search for "password" found the component stuff, but missed the "pwd" strings used in the db-specific section.
Here is the "// db-specific connection information" for nagiossql:

"nagiosql" => array(
"dbtype" => 'mysql',
"dbserver" => 'localhost',
"user" => 'nagiosql',
"pwd" => 'n@gweb',
"db" => 'nagiosql',


I tried again to reset the Security Credentials without attempting change anything in the "Sub-System Credentials" section, but no luck.
Interestingly, the "Sub-System Credentials" section has three boxes that all have 11 dots -- suggesting that the last time I tried
to set all the boxes the same, it stuck somewhere (cached?) and now is just trying to reset to that 11-character password. Now, from the
snippit above, I assume that one of those passwords need to be "n@gweb". This brings a couple of questions to mind:
1. Which box do I need to attempt to reset to "n@gweb"?
2. What values do I attempt to reset the other boxes to?

Re: Backend login to the Core Config Manager failed

Posted: Tue Feb 12, 2013 11:31 am
by pteegarden
I manually changed the password in /var/www/html/nagiosql/config/settings.php to n@gweb. That seemed to allow the access of Legacy CCM and the creation/addition of new servers. How this got wedjed in the first place is still a mystery to me.

Re: Backend login to the Core Config Manager failed

Posted: Tue Feb 12, 2013 11:37 am
by slansing
Odd, glad to hear it is resolved, mayhaps a dev will chime in with some possibilities as to why this was caused.