EJABBERD: registering new account using an admin connection

Symptom:

Using ejabberd 2.1.x built from source code from Git repository.

I’m connecting to an ejabberd server using Smack XMPP client library. I am able to create new accounts on the XMPP server when the connection is not logged, just connected to the server. If I connect using an account, like admin, and I try to register a new account, it fails causing a forbidden (403) error on the ejabberd server.

Solution:

Just add the following configuration to ejabberd.cfg configuration file:

%% Put this in the section ACCESS RULES
{access, register_from, [{allow, admin}]}.

%% Change mod_register so it contains the new access rule:

{mod_register, [
          {access_from, register_from},
           ...
                    ] ...

Thanks to:

http://www.ejabberd.im/node/3914

This entry was posted in configuration and tagged , . Bookmark the permalink.

1 Response to EJABBERD: registering new account using an admin connection

  1. gernak says:

    Creating the special register_from rule didn’t work for me, I needed {access_from, register}

Leave a comment