Very good point on calling Ejabberd_config:get_local_option(). When I realized that it was not<div>seeing the changes in the configuration file and realized that a colleague of mine enabled</div><div>anonymous support which threw me off since it modifies the value via the {host_config} tuple.</div>
<div><br></div><div>Thank you very much for your time. It looks like I need to learn to read a bit more.</div><div><br></div><div>Thanks,</div><div>William</div><div><div><div><br><div class="gmail_quote">2010/11/16 Boris Okner <span dir="ltr"><<a href="mailto:boris.okner@gmail.com">boris.okner@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Ok, it almost looks like you're authenticating against another server :-)<br>In debug console, try:<br><br>ejabberd_auth:check_password(User, Server, Password).<br>
<br>If that gives you false, then try to stop the server and see if your authentication still works :-).<div>
If true is returned, then you probably still have some other auth method.<br>You can "play" this code in debug shell, to figure out what auth methods are there.</div><div><br></div><div><div>Server = "<your_domain>",</div>
<div> LServer = jlib:nameprep(Server),</div><div> Method = ejabberd_config:get_local_option({auth_method, LServer}),</div><div> Methods = if</div><div><span style="white-space:pre-wrap"> </span> Method == undefined -> [];</div>
<div><span style="white-space:pre-wrap"> </span> is_list(Method) -> Method;</div><div><span style="white-space:pre-wrap"> </span> is_atom(Method) -> [Method]</div><div><span style="white-space:pre-wrap"> </span> end,</div>
<div> [list_to_atom("ejabberd_auth_" ++ atom_to_list(M)) || M <- Methods].</div></div><div><br></div><div><br></div><div>Boris <div><div></div><div class="h5"><br><br><div class="gmail_quote">On Tue, Nov 16, 2010 at 3:57 PM, William Key <span dir="ltr"><<a href="mailto:williamkey@gmail.com" target="_blank">williamkey@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">The exports returned:<div><br><div><div>Exports:</div><div>check_password/3 is_user_exists/2</div><div>check_password/5 module_info/0</div>
<div>dirty_get_registered_users/0 module_info/1</div><div>
get_password/2 plain_password_required/0</div><div>get_password_s/2 remove_user/2</div><div>get_vh_registered_users/1 remove_user/3</div><div>get_vh_registered_users/2 set_password/3</div>
<div>get_vh_registered_users_numberstart/1</div><div>get_vh_registered_users_numbertry_register/3</div><div>ok</div></div><div><br></div><div>check_password() returned false (as expected, as I still haven't fully implemented everything) and the ?INFO_MSG was called. When</div>
<div>actually authenticating with the server the ?INFO_MSG does not show up in the logs at all.</div><div><br></div><div>Thanks,</div><div>William</div><div><br><br><div class="gmail_quote">2010/11/16 Boris Okner <span dir="ltr"><<a href="mailto:boris.okner@gmail.com" target="_blank">boris.okner@gmail.com</a>></span><div>
<div></div><div><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hmm...I haven't used 2.0.1, but by looking at the code, it should still work. I would recommend to fire off debug session, something like:<br>
<br>sudo ejabberdctl debug<br><br>and then from Erlang shell do:<br><br><div>
m(ejabberd_auth_authtest).<br><br><div>If you see that your module was found, and the info looks right, try:</div><div><br>User = "your_user_name",<br>Server = "your_domain_name",<div>Password = "your_password",<br>
ejabberd_auth_authtest:check_password(User, Server, Password).</div><div><br></div><div>This will verify if your module does authentication as expected.</div><div>We can go from there.</div><div><br></div><div>Cheers,</div>
<div>Boris<font color="#888888"><br><br></font><div class="gmail_quote"><div><div></div><div>On Tue, Nov 16, 2010 at 3:27 PM, William Key <span dir="ltr"><<a href="mailto:williamkey@gmail.com" target="_blank">williamkey@gmail.com</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div></div><div>
<div><div>Thanks for the quick response. My configuration has every auth_method commented out except</div><div>mine which is {auth_method, authtest}. Is there anything specific I should be doing other than compiling</div>
<div>
the module and moving it to the Ejabberd ebin directory? It has the same functions as the odbc auth module</div></div><div>and the functions are exported. The filename is ejabberd_auth_authtest.</div><div><br></div><div>
I'm still able to authenticate with Ejabberd even though my module wouldn't allow it. I've completely restarted</div>
<div>the server multiple times as well. Note: I'm using Ejabberd 2.0.1-6+lenny2 (Ejabberd Debian package)</div><div><br></div><div>Thanks,</div><div>William</div>
<br></div></div><div>_______________________________________________<br>
ejabberd mailing list<br>
<a href="mailto:ejabberd@jabber.ru" target="_blank">ejabberd@jabber.ru</a><br>
<a href="http://lists.jabber.ru/mailman/listinfo/ejabberd" target="_blank">http://lists.jabber.ru/mailman/listinfo/ejabberd</a><br>
<br></div></blockquote></div><br></div></div></div>
<br>_______________________________________________<br>
ejabberd mailing list<br>
<a href="mailto:ejabberd@jabber.ru" target="_blank">ejabberd@jabber.ru</a><br>
<a href="http://lists.jabber.ru/mailman/listinfo/ejabberd" target="_blank">http://lists.jabber.ru/mailman/listinfo/ejabberd</a><br>
<br></blockquote></div></div></div><br></div></div>
<br>_______________________________________________<br>
ejabberd mailing list<br>
<a href="mailto:ejabberd@jabber.ru" target="_blank">ejabberd@jabber.ru</a><br>
<a href="http://lists.jabber.ru/mailman/listinfo/ejabberd" target="_blank">http://lists.jabber.ru/mailman/listinfo/ejabberd</a><br>
<br></blockquote></div><br></div></div></div>
<br>_______________________________________________<br>
ejabberd mailing list<br>
<a href="mailto:ejabberd@jabber.ru">ejabberd@jabber.ru</a><br>
<a href="http://lists.jabber.ru/mailman/listinfo/ejabberd" target="_blank">http://lists.jabber.ru/mailman/listinfo/ejabberd</a><br>
<br></blockquote></div><br></div></div></div>