[ejabberd] external authentication question

Badlop badlop at gmail.com
Wed Feb 16 23:02:25 MSK 2011


2011/2/15 İşbaran Akçayır <isbaran at gmail.com>:
> Currently script resides in /etc/ejabberd and i have these lines in
> ejabberd.cfg
>
> {auth_method, external}.
> {extauth_program, "/etc/ejabberd/auth.py"}.
>
> [0] I see this message in log file while logging in : "Accepted
> authentication for user by ejabberd_auth_internal"


It doesn't make sense that the problem happens considering the details
you provided.
Probably there are details particular to your installation that nobody
else than you know or can check.

Just one possible detail: maybe there are several auth_method options
in your ejabberd.cfg , you only show us the first one. But ejabberd
only uses the last one in the file.

In the worst case, stop and uninstall ejabberd, delete the config and
database dirs,
and then install from scratch.

In case you want to continue investigating the current installation:
My test configuration includes:

override_global.
override_local.
override_acls.
{hosts, ["localhost", "int.localhost", "ext.localhost"]}.
{auth_method, [internal]}.
{host_config, "int.localhost", [{auth_method, [internal]}]}.
{host_config, "ext.localhost", [{auth_method, [external]}]}.

And then I get my expected results:

$ ejabberdctl live

ejabberd_config:get_local_option({auth_method, "int.localhost"}).
[internal]

ejabberd_config:get_local_option({auth_method, "ext.localhost"}).
[external]

ejabberd_auth:get_password_with_authmodule("userint", "int.localhost").
{"passint",ejabberd_auth_internal}

ejabberd_auth:get_password_with_authmodule("userext", "ext.localhost").
{false,ejabberd_auth_external}

ejabberd_auth:is_user_exists_in_other_modules(ejabberd_auth_internal,
"userint", "int.localhost").
false

ejabberd_auth:is_user_exists_in_other_modules(ejabberd_auth_external,
"userext", "ext.localhost").
false


---
Badlop
ProcessOne


More information about the ejabberd mailing list