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:
Creating the special register_from rule didn’t work for me, I needed {access_from, register}