[ejabberd] Different users for different domains

Kirill Ratkin kirill.v.ratkin at gmail.com
Sat May 4 19:34:01 MSK 2013


I want to configure ejabberd for two domains but I want users were in
different domains.
For example I have two domains: example.com and example.org
and user Bob.
I want Bob can to login using JID bob at example.com but he can not login as
bob at example.org with same password.
In other words I want to have two 'different Bobs' (no no, I'm not about
Superstring Theory) (just one Bob is in example.com and another one is in

What I'm trying now is to configure virtual hosts :

{host_config, "example.com", [{auth_method, odbc},
        {odbc_server, "DSN=excom;UID=ejabberd;PWD=pass"}]}.
{host_config, "example.org", [{auth_method, odbc},
        {odbc_server, "DSN=exorg;UID=ejabberd;PWD=pass"}]}.

But is doesn't work because below in cfg file I have settings for MySQL
connection ...
{odbc_server, {mysql, "", "ejabberdb", "ejabberd", "pass"}}.

And ejabberd connects to this database (ejabberdb) instead DSN in
host_config ...

So gentlemen, I need your help ... maybe I go to wrong way ...

And second question is about scram passwords in MySQL DB.
How I understand it doesn't support now. What about plans to support? Now I
use external auth script to save password hashes (not plain passwords) in
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.jabber.ru/pipermail/ejabberd/attachments/20130504/855b2a8a/attachment.html>

More information about the ejabberd mailing list