Hi,<br><br>You will need to tell auth_import_mysql.php where Ninja is installed when you run it, like this:<br><br>./install_scripts/auth_import_mysql.php /usr/local/nagios/addons/ninja<br><br>Normally auth_import_mysql.php is run by ninja_init_db.sh which takes care of that for you, but if you run the import script alone you'll need to give it a path.<br>
<br>/Martin<br><br><div class="gmail_quote">On Wed, Oct 7, 2009 at 1:49 AM, Michael Saville <span dir="ltr"><<a href="mailto:michaelsaville@gmail.com">michaelsaville@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>Tom, </div><div>Still get the same error, even tried running it from the cli-helpers directory. </div><div><br></div><div>[root@localhost ninja]# ./install_scripts/auth_import.php</div><div>[root@localhost ninja]# ./install_scripts/auth_import_mysql.php</div>
<div class="im">
<div>Unable to find htpasswd-import class so this script will now terminate</div></div><div>[root@localhost ninja]# find ./ -name htpasswd-import.php</div><div class="im"><div>./cli-helpers/htpasswd-import.php</div></div>
<div>[root@localhost ninja]#</div>
<div><br></div>Thanks -Michael<div><br><div class="gmail_quote">On Tue, Oct 6, 2009 at 6:59 PM, Thomas Hudson <span dir="ltr"><<a href="mailto:tom.hudson@isotoma.com" target="_blank">tom.hudson@isotoma.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
cd into your ninja directory, try running it from there (it may be a<br>
relative/absolute path issue).<br>
If that's not it, in that directory run:<br>
<br>
find ./ -name htpasswd-import.php<br>
<br>
and let me know what it tells you.<br>
<br>
Tom Hudson<br>
isotoma<div class="im"><br>
<div><br>
<br>
Michael Saville wrote:<br>
> Ok, i modified the files as posted above (the auth_import_mysql.php)<br>
> and now when i try to run the script i get : "Unable to find<br>
> htpasswd-import class so this script will now terminate" I did verify<br>
> that awk was installed. Also checked the database.php and found all<br>
> correct data there. Thanks -Michael<br>
><br>
> On Tue, Oct 6, 2009 at 4:10 PM, Lino Eduardo Avila<br>
</div></div><div class="im"><div>> <<a href="mailto:lino.avila@gmail.com" target="_blank">lino.avila@gmail.com</a> <mailto:<a href="mailto:lino.avila@gmail.com" target="_blank">lino.avila@gmail.com</a>>> wrote:<br>
><br>
> 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>
><br>
><br>
><br>
> On Tue, Oct 6, 2009 at 3:05 PM, Thomas Hudson<br>
</div></div><div class="im"><div>> <<a href="mailto:tom.hudson@isotoma.com" target="_blank">tom.hudson@isotoma.com</a> <mailto:<a href="mailto:tom.hudson@isotoma.com" target="_blank">tom.hudson@isotoma.com</a>>> wrote:<br>
> > Lino,<br>
> ><br>
> > Try changing the password in<br>
> 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<br>
> 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<br>
> 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<br>
</div></div><div><div></div><div class="h5"><div><div></div><div>> <<a href="mailto:tom.hudson@isotoma.com" target="_blank">tom.hudson@isotoma.com</a> <mailto:<a href="mailto:tom.hudson@isotoma.com" target="_blank">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>
> >>>><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>
> >>>><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<br>
</div></div></div></div><div><div></div><div class="h5"><div><div></div><div>> <<a href="mailto:tom.hudson@isotoma.com" target="_blank">tom.hudson@isotoma.com</a> <mailto:<a href="mailto:tom.hudson@isotoma.com" target="_blank">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>
> >>>>>><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>
> >>>>>><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>
> >>>>>><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<br>
> not be<br>
> >>>>>> established in<br>
> /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<br>
</div></div></div></div><div class="im"><div>> <<a href="mailto:martin.svangren@op5.com" target="_blank">martin.svangren@op5.com</a> <mailto:<a href="mailto:martin.svangren@op5.com" target="_blank">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<br>
> user import to<br>
> >>>>>>> work. Have a look at the "Modify and run the install<br>
> 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<br>
> auth_import_mysql.php<br>
> >>>>>>> and run the install scripts again. Note that you also need<br>
> 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<br>
</div></div>> <<a href="mailto:tom.hudson@isotoma.com" target="_blank">tom.hudson@isotoma.com</a> <mailto:<a href="mailto:tom.hudson@isotoma.com" target="_blank">tom.hudson@isotoma.com</a>>><div><div></div>
<div class="h5"><br>
<div><div></div><div>> >>>>>>> wrote:<br>
> >>>>>>><br>
> >>>>>>><br>
> >>>>>>><br>
> >>>>>>>> Michael Saville wrote:<br>
> >>>>>>>><br>
> >>>>>>>><br>
> >>>>>>>><br>
> >>>>>>>>> Hello,<br>
> >>>>>>>>><br>
> >>>>>>>>> Ive installed and configured both merlin and ninja as<br>
> per the online<br>
> >>>>>>>>> documentation. I did not get any errors throughout the<br>
> process. I can<br>
> >>>>>>>>> browse to //localhost/ninja but cannt login i get Login<br>
> failed -<br>
> >>>>>>>>> please try again everytime. Ive tried the user name and<br>
> password<br>
> >>>>>>>>> configured for nagios. I also looked around the mailing<br>
> archive and<br>
> >>>>>>>>> found another user with the similar problem he found<br>
> that using<br>
> >>>>>>>>> monitor, monitor was the solution for him. Ive tried and<br>
> that doe not<br>
> >>>>>>>>> work. I installed phpmy admin and took a look at the<br>
> database i can<br>
> >>>>>>>>> see that the ninja.sql did import and merlin seems to<br>
> have information<br>
> >>>>>>>>> in it. Any Ideas on a solution ? Im very new to Nagios<br>
> and am not sure<br>
> >>>>>>>>> where to begin troubleshooting this. Thanks -Michael<br>
> >>>>>>>>><br>
> >>>>>>>>> --<br>
> >>>>>>>>> Michael L Saville<br>
> >>>>>>>>><br>
> ------------------------------------------------------------------------<br>
> >>>>>>>>><br>
> >>>>>>>>> _______________________________________________<br>
> >>>>>>>>> op5-users mailing list<br>
</div></div></div></div>> >>>>>>>>> <a href="mailto:op5-users@lists.op5.com" target="_blank">op5-users@lists.op5.com</a> <mailto:<a href="mailto:op5-users@lists.op5.com" target="_blank">op5-users@lists.op5.com</a>><div class="im">
<br>
<div>> >>>>>>>>> <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<br>
> of the tables<br>
> >>>>>>>> and copy the usernames and passwords across from nagios.<br>
> I had that<br>
> >>>>>>>> problem when I was installing yesterday.<br>
> >>>>>>>> I've fixed the scripts but I'm still working out how to<br>
> use git. When I<br>
> >>>>>>>> do, I'll submit the changes and - fingers crossed -<br>
> 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,<br>
> 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>
</div></div>> >>>>>>>> <a href="mailto:op5-users@lists.op5.com" target="_blank">op5-users@lists.op5.com</a> <mailto:<a href="mailto:op5-users@lists.op5.com" target="_blank">op5-users@lists.op5.com</a>><div class="im">
<br>
<div>> >>>>>>>> <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" target="_blank">martin.svangren@op5.com</a><br>
</div></div>> <mailto:<a href="mailto:martin.svangren@op5.com" target="_blank">martin.svangren@op5.com</a>><div class="im"><br>
<div>> >>>>>>> Web: <a href="http://www.op5.com" target="_blank">http://www.op5.com</a><br>
> >>>>>>><br>
> >>>>>>> _______________________________________________<br>
> >>>>>>> op5-users mailing list<br>
</div></div>> >>>>>>> <a href="mailto:op5-users@lists.op5.com" target="_blank">op5-users@lists.op5.com</a> <mailto:<a href="mailto:op5-users@lists.op5.com" target="_blank">op5-users@lists.op5.com</a>><div class="im">
<br>
<div>> >>>>>>> <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>
</div></div>> >>>>>> <a href="mailto:op5-users@lists.op5.com" target="_blank">op5-users@lists.op5.com</a> <mailto:<a href="mailto:op5-users@lists.op5.com" target="_blank">op5-users@lists.op5.com</a>><div class="im">
<br>
<div>> >>>>>> <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<br>
> 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<br>
> assuming there<br>
> >>>>> isn't one.<br>
> >>>>><br>
> >>>>> Hope this helps,<br>
> >>>>><br>
> >>>>> Tom Hudson<br>
> >>>>> isotoma<br>
> >>>>> _______________________________________________<br>
> >>>>> op5-users mailing list<br>
</div></div>> >>>>> <a href="mailto:op5-users@lists.op5.com" target="_blank">op5-users@lists.op5.com</a> <mailto:<a href="mailto:op5-users@lists.op5.com" target="_blank">op5-users@lists.op5.com</a>><div class="im">
<br>
<div>> >>>>> <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>
</div></div>> >>>> <a href="mailto:op5-users@lists.op5.com" target="_blank">op5-users@lists.op5.com</a> <mailto:<a href="mailto:op5-users@lists.op5.com" target="_blank">op5-users@lists.op5.com</a>><div class="im">
<br>
<div>> >>>> <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>
</div></div>> >>> <a href="mailto:op5-users@lists.op5.com" target="_blank">op5-users@lists.op5.com</a> <mailto:<a href="mailto:op5-users@lists.op5.com" target="_blank">op5-users@lists.op5.com</a>><div class="im">
<br>
<div>> >>> <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>
</div></div>> >> <a href="mailto:op5-users@lists.op5.com" target="_blank">op5-users@lists.op5.com</a> <mailto:<a href="mailto:op5-users@lists.op5.com" target="_blank">op5-users@lists.op5.com</a>><div class="im">
<br>
<div>> >> <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>
</div></div>> > <a href="mailto:op5-users@lists.op5.com" target="_blank">op5-users@lists.op5.com</a> <mailto:<a href="mailto:op5-users@lists.op5.com" target="_blank">op5-users@lists.op5.com</a>><div class="im">
<br>
<div>> > <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>
</div></div>> <a href="mailto:op5-users@lists.op5.com" target="_blank">op5-users@lists.op5.com</a> <mailto:<a href="mailto:op5-users@lists.op5.com" target="_blank">op5-users@lists.op5.com</a>><div class="im">
<br>
<div>> <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>
> Michael L Saville<br>
> _________________<br>
> Never do anything that you wouldn't want to explain to the paramedics.<br>
</div></div>> ------------------------------------------------------------------------<div class="im"><br>
<div><div></div><div>><br>
> _______________________________________________<br>
> op5-users mailing list<br>
> <a href="mailto:op5-users@lists.op5.com" target="_blank">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" target="_blank">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></div></blockquote></div><div class="im"><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></div>
<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></blockquote></div><br><br clear="all"><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">http://www.op5.com</a><br>