Ok, i modified the files as posted above (the auth_import_mysql.php) and now when i try to run the script i get : "Unable to find htpasswd-import class so this script will now terminate" I did verify that awk was installed. Also checked the database.php and found all correct data there. Thanks -Michael<div>
<br><div class="gmail_quote">On Tue, Oct 6, 2009 at 4:10 PM, Lino Eduardo Avila <span dir="ltr"><<a href="mailto:lino.avila@gmail.com">lino.avila@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
finally. Thank you very much Tom!<br>
<br>
The installation guide should have these settings at least for CentOS.<br>
<br>
import.php and database.php<br>
<div><div></div><div class="h5"><br>
<br>
<br>
On Tue, Oct 6, 2009 at 3:05 PM, Thomas Hudson <<a href="mailto:tom.hudson@isotoma.com">tom.hudson@isotoma.com</a>> wrote:<br>
> Lino,<br>
><br>
> Try changing the password in ninja/application/config/database.php as well.<br>
><br>
> Tom Hudson<br>
> isotoma<br>
><br>
><br>
> Lino Eduardo Avila wrote:<br>
>> that did the trick thanks Tom!.... now... when logging into ninja in<br>
>> the web interface I get the following message:<br>
>><br>
>> Warning Message<br>
>><br>
>> An error was detected which prevented the loading of this page. If<br>
>> this problem persists, please contact the website administrator.<br>
>><br>
>> system/libraries/drivers/Database/Mysql.php [61]:<br>
>><br>
>> mysql_connect() [function.mysql-connect]: Access denied for user<br>
>> 'merlin'@'localhost' (using password: YES)<br>
>><br>
>><br>
>><br>
>> I believe this has to do with the ninja configuration... Does anyone<br>
>> knows where is stored this info?<br>
>><br>
>><br>
>> Best Regards,<br>
>><br>
>><br>
>> On Tue, Oct 6, 2009 at 2:17 PM, Thomas Hudson <<a href="mailto:tom.hudson@isotoma.com">tom.hudson@isotoma.com</a>> wrote:<br>
>><br>
>>> Lino,<br>
>>><br>
>>> Have you changed the merlin database user password?<br>
>>> It's the only thing I can think of right now.<br>
>>><br>
>>> If you have, you should change it in import.php in the merlin root<br>
>>> directory:<br>
>>> $imp->db_pass = 'merlin';<br>
>>><br>
>>> If not, let me know and I'll have another look at it.<br>
>>><br>
>>> Hope that helps,<br>
>>><br>
>>> Tom Hudson<br>
>>> isotoma<br>
>>><br>
>>> Lino Eduardo Avila wrote:<br>
>>><br>
>>>> Thanks for your help Tom it already imported the users but still<br>
>>>> getting some errors<br>
>>>><br>
>>>> [root@nagios-centOS install_scripts]# ./ninja_db_init.sh<br>
>>>> /usr/local/nagios/addons/ninja<br>
>>>> Enter password:<br>
>>>> Importing users from cgi.cfg<br>
>>>> PHP Warning: mysql_connect(): Access denied for user<br>
>>>> 'merlin'@'localhost' (using password: YES) in<br>
>>>> /usr/local/nagios/addons/ninja/install_scripts/auth_import_mysql.php<br>
>>>> on line 99<br>
>>>> PHP Fatal error: Call to undefined method<br>
>>>> ninja_auth_import::gui_db_connect() in<br>
>>>> /usr/local/nagios/addons/ninja/install_scripts/auth_import_mysql.php<br>
>>>> on line 137<br>
>>>><br>
>>>><br>
>>>> Regards,<br>
>>>><br>
>>>><br>
>>>> On Tue, Oct 6, 2009 at 12:33 PM, Thomas Hudson <<a href="mailto:tom.hudson@isotoma.com">tom.hudson@isotoma.com</a>> wrote:<br>
>>>><br>
>>>><br>
>>>>> Lino Eduardo Avila wrote:<br>
>>>>><br>
>>>>><br>
>>>>>> I have the same issue in CentOS 5 with nagios 3.2, ninja 0.3.2<br>
>>>>>><br>
>>>>>> [root@nagios-centOS ninja]# install_scripts/ninja_db_init.sh<br>
>>>>>> /usr/local/nagios/addons/ninja<br>
>>>>>> Importing users from cgi.cfg<br>
>>>>>> PHP Warning: mysql_connect(): Access denied for user<br>
>>>>>> 'merlin'@'localhost' (using password: YES) in<br>
>>>>>> /usr/local/nagios/addons/ninja/install_scripts/auth_import_mysql.php<br>
>>>>>> on line 99<br>
>>>>>> PHP Warning: mysql_connect(): Access denied for user<br>
>>>>>> 'merlin'@'localhost' (using password: YES) in<br>
>>>>>> /usr/local/nagios/addons/ninja/cli-helpers/htpasswd-import.php on line<br>
>>>>>> 34<br>
>>>>>> PHP Warning: mysql_select_db(): Access denied for user<br>
>>>>>> 'root'@'localhost' (using password: NO) in<br>
>>>>>> /usr/local/nagios/addons/ninja/cli-helpers/htpasswd-import.php on line<br>
>>>>>> 35<br>
>>>>>> PHP Warning: mysql_select_db(): A link to the server could not be<br>
>>>>>> established in /usr/local/nagios/addons/ninja/cli-helpers/htpasswd-import.php<br>
>>>>>> on line 35<br>
>>>>>> Failed to select database 'merlin'<br>
>>>>>> Access denied for user 'root'@'localhost' (using password: NO)<br>
>>>>>><br>
>>>>>> I already tried with the user merlin and root in the file:<br>
>>>>>> install_scripts/ninja_db_init.sh<br>
>>>>>><br>
>>>>>> but the same problem...<br>
>>>>>><br>
>>>>>> Merlin is working correctly. I already looked at the db.<br>
>>>>>><br>
>>>>>><br>
>>>>>> Regards,<br>
>>>>>><br>
>>>>>><br>
>>>>>><br>
>>>>>> On Tue, Oct 6, 2009 at 3:57 AM, Martin Svangren <<a href="mailto:martin.svangren@op5.com">martin.svangren@op5.com</a>> wrote:<br>
>>>>>><br>
>>>>>><br>
>>>>>><br>
>>>>>>> Hi Michael,<br>
>>>>>>><br>
>>>>>>> You might need to edit the install scripts a bit for the user import to<br>
>>>>>>> work. Have a look at the "Modify and run the install scripts" section of<br>
>>>>>>> this wiki page:<br>
>>>>>>><br>
>>>>>>> <a href="https://wiki.op5.com/ninja:docs:quickstart-centos5" target="_blank">https://wiki.op5.com/ninja:docs:quickstart-centos5</a><br>
>>>>>>><br>
>>>>>>> Basically, you'll need to edit some hardcoded paths in auth_import_mysql.php<br>
>>>>>>> and run the install scripts again. Note that you also need to have the 'awk'<br>
>>>>>>> utility installed for the scripts to work.<br>
>>>>>>><br>
>>>>>>> /Martin<br>
>>>>>>><br>
>>>>>>> On Tue, Oct 6, 2009 at 10:46 AM, Thomas Hudson <<a href="mailto:tom.hudson@isotoma.com">tom.hudson@isotoma.com</a>><br>
>>>>>>> wrote:<br>
>>>>>>><br>
>>>>>>><br>
>>>>>>><br>
>>>>>>>> Michael Saville wrote:<br>
>>>>>>>><br>
>>>>>>>><br>
>>>>>>>><br>
>>>>>>>>> Hello,<br>
>>>>>>>>><br>
>>>>>>>>> Ive installed and configured both merlin and ninja as per the online<br>
>>>>>>>>> documentation. I did not get any errors throughout the process. I can<br>
>>>>>>>>> browse to //localhost/ninja but cannt login i get Login failed -<br>
>>>>>>>>> please try again everytime. Ive tried the user name and password<br>
>>>>>>>>> configured for nagios. I also looked around the mailing archive and<br>
>>>>>>>>> found another user with the similar problem he found that using<br>
>>>>>>>>> monitor, monitor was the solution for him. Ive tried and that doe not<br>
>>>>>>>>> work. I installed phpmy admin and took a look at the database i can<br>
>>>>>>>>> see that the ninja.sql did import and merlin seems to have information<br>
>>>>>>>>> in it. Any Ideas on a solution ? Im very new to Nagios and am not sure<br>
>>>>>>>>> where to begin troubleshooting this. Thanks -Michael<br>
>>>>>>>>><br>
>>>>>>>>> --<br>
>>>>>>>>> Michael L Saville<br>
>>>>>>>>> ------------------------------------------------------------------------<br>
>>>>>>>>><br>
>>>>>>>>> _______________________________________________<br>
>>>>>>>>> op5-users mailing list<br>
>>>>>>>>> <a href="mailto:op5-users@lists.op5.com">op5-users@lists.op5.com</a><br>
>>>>>>>>> <a href="http://lists.op5.com/mailman/listinfo/op5-users" target="_blank">http://lists.op5.com/mailman/listinfo/op5-users</a><br>
>>>>>>>>><br>
>>>>>>>>><br>
>>>>>>>>><br>
>>>>>>>>><br>
>>>>>>>> Michael,<br>
>>>>>>>><br>
>>>>>>>> It's possible that the install of ninja didn't create all of the tables<br>
>>>>>>>> and copy the usernames and passwords across from nagios. I had that<br>
>>>>>>>> problem when I was installing yesterday.<br>
>>>>>>>> I've fixed the scripts but I'm still working out how to use git. When I<br>
>>>>>>>> do, I'll submit the changes and - fingers crossed - you'll be able to<br>
>>>>>>>> use those and it'll just work.<br>
>>>>>>>><br>
>>>>>>>> In the mean-time, things you should check:<br>
>>>>>>>> - In the merlin database, has ninja created the tables, for example<br>
>>>>>>>> ninja_user_authorization.<br>
>>>>>>>> - If that table is there, is there anything in it?<br>
>>>>>>>><br>
>>>>>>>> Cheers,<br>
>>>>>>>><br>
>>>>>>>> Tom Hudson<br>
>>>>>>>> _______________________________________________<br>
>>>>>>>> op5-users mailing list<br>
>>>>>>>> <a href="mailto:op5-users@lists.op5.com">op5-users@lists.op5.com</a><br>
>>>>>>>> <a href="http://lists.op5.com/mailman/listinfo/op5-users" target="_blank">http://lists.op5.com/mailman/listinfo/op5-users</a><br>
>>>>>>>><br>
>>>>>>>><br>
>>>>>>>><br>
>>>>>>> --<br>
>>>>>>> Martin Svangren<br>
>>>>>>> System Administrator<br>
>>>>>>><br>
>>>>>>> op5 AB<br>
>>>>>>> Första Långgatan 19<br>
>>>>>>> SE-413 27 Göteborg, SWEDEN<br>
>>>>>>><br>
>>>>>>> Direct: +46 (0)31-352 56 21<br>
>>>>>>> Mobile: +46 (0)733-70 90 21<br>
>>>>>>> Switchboard: +46 (0)31-352 56 00<br>
>>>>>>><br>
>>>>>>> E-mail: <a href="mailto:martin.svangren@op5.com">martin.svangren@op5.com</a><br>
>>>>>>> Web: <a href="http://www.op5.com" target="_blank">http://www.op5.com</a><br>
>>>>>>><br>
>>>>>>> _______________________________________________<br>
>>>>>>> op5-users mailing list<br>
>>>>>>> <a href="mailto:op5-users@lists.op5.com">op5-users@lists.op5.com</a><br>
>>>>>>> <a href="http://lists.op5.com/mailman/listinfo/op5-users" target="_blank">http://lists.op5.com/mailman/listinfo/op5-users</a><br>
>>>>>>><br>
>>>>>>><br>
>>>>>>><br>
>>>>>>><br>
>>>>>>><br>
>>>>>> _______________________________________________<br>
>>>>>> op5-users mailing list<br>
>>>>>> <a href="mailto:op5-users@lists.op5.com">op5-users@lists.op5.com</a><br>
>>>>>> <a href="http://lists.op5.com/mailman/listinfo/op5-users" target="_blank">http://lists.op5.com/mailman/listinfo/op5-users</a><br>
>>>>>><br>
>>>>>><br>
>>>>>><br>
>>>>> That's one of the things I've changed (though I don't know if it's the<br>
>>>>> desired solution and haven't had time to submit the patches).<br>
>>>>><br>
>>>>> I changed the line:<br>
>>>>> db_login_opts="-u$db_user"<br>
>>>>><br>
>>>>> in ninja_db_init.sh to:<br>
>>>>> db_login_opts="-u$db_user -p"<br>
>>>>><br>
>>>>><br>
>>>>> which prompts you for the db admin password rather than assuming there<br>
>>>>> isn't one.<br>
>>>>><br>
>>>>> Hope this helps,<br>
>>>>><br>
>>>>> Tom Hudson<br>
>>>>> isotoma<br>
>>>>> _______________________________________________<br>
>>>>> op5-users mailing list<br>
>>>>> <a href="mailto:op5-users@lists.op5.com">op5-users@lists.op5.com</a><br>
>>>>> <a href="http://lists.op5.com/mailman/listinfo/op5-users" target="_blank">http://lists.op5.com/mailman/listinfo/op5-users</a><br>
>>>>><br>
>>>>><br>
>>>>><br>
>>>> _______________________________________________<br>
>>>> op5-users mailing list<br>
>>>> <a href="mailto:op5-users@lists.op5.com">op5-users@lists.op5.com</a><br>
>>>> <a href="http://lists.op5.com/mailman/listinfo/op5-users" target="_blank">http://lists.op5.com/mailman/listinfo/op5-users</a><br>
>>>><br>
>>>><br>
>>> _______________________________________________<br>
>>> op5-users mailing list<br>
>>> <a href="mailto:op5-users@lists.op5.com">op5-users@lists.op5.com</a><br>
>>> <a href="http://lists.op5.com/mailman/listinfo/op5-users" target="_blank">http://lists.op5.com/mailman/listinfo/op5-users</a><br>
>>><br>
>>><br>
>> _______________________________________________<br>
>> op5-users mailing list<br>
>> <a href="mailto:op5-users@lists.op5.com">op5-users@lists.op5.com</a><br>
>> <a href="http://lists.op5.com/mailman/listinfo/op5-users" target="_blank">http://lists.op5.com/mailman/listinfo/op5-users</a><br>
>><br>
><br>
> _______________________________________________<br>
> op5-users mailing list<br>
> <a href="mailto:op5-users@lists.op5.com">op5-users@lists.op5.com</a><br>
> <a href="http://lists.op5.com/mailman/listinfo/op5-users" target="_blank">http://lists.op5.com/mailman/listinfo/op5-users</a><br>
><br>
_______________________________________________<br>
op5-users mailing list<br>
<a href="mailto:op5-users@lists.op5.com">op5-users@lists.op5.com</a><br>
<a href="http://lists.op5.com/mailman/listinfo/op5-users" target="_blank">http://lists.op5.com/mailman/listinfo/op5-users</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Michael L Saville<br>_________________<br>Never do anything that you wouldn't want to explain to the paramedics.<br>
</div>