ejabberd - Comments for "Problems registering users" https://www.ejabberd.im/node/3313 en You are right: extauth doesn't implement account creation https://www.ejabberd.im/node/3313#comment-53850 <div class="quote-msg"> <div class="quote-author"><em>jtschaff</em> wrote:</div> <p>registration while using external authentication isn't supported</p></div> <p>Ah, you are right. The code shows that extauth doesn't allow to register accounts. The development documentation of extauth doesn't include registration among the allowed operations:</p> <p><noindex><a href="http://svn.process-one.net/ejabberd/trunk/doc/dev.html#htoc9" title="http://svn.process-one.net/ejabberd/trunk/doc/dev.html#htoc9" rel="nofollow" >http://svn.process-one.net/ejabberd/trunk/doc/dev.html#htoc9</a></noindex></p> <div class="codeblock"><code>operation are as follows:<br />&nbsp;&nbsp;&nbsp; * auth:User:Server:Password (check if a username/password pair is correct)<br />&nbsp;&nbsp;&nbsp; * isuser:User:Server (check if it’s a valid user)<br />&nbsp;&nbsp;&nbsp; * setpass:User:Server:Password (set user’s password) </code></div> <p>Checking the ejabberd source code, account registration is allowed when using internal or odbc authentication. Account registration is not allowed when using anonymous, external, ldap or pam. I'll make ure this is explained in the ejabberd Guide in the next ejabberd version.</p> <p>So, it is expected that you give to your users another mechanism so they create accounts in your external system (a web formulary to your external database, or ...).</p> Wed, 17 Dec 2008 08:05:26 +0000 mfoss comment 53850 at https://www.ejabberd.im think I found it... https://www.ejabberd.im/node/3313#comment-53848 <p>Hi badlop - Thanks for the quick reply. I was actually about to update this ticket - since I posted originally, I downloaded the source and it appears the problem isn't my script but that registration while using external authentication isn't supported. I don't know Erlang beyond reading the tutorial today, but when using {auth_method, external} the registration ends seems to end at ejabberd_auth_external:try_register, which just says no:</p> <div class="codeblock"><code>try_register(_User, _Server, _Password) -&gt;<br />&nbsp;&nbsp;&nbsp; {error, not_allowed}.</code></div> <p>I changed ejabberd.cfg to use internal auth, registered with ejabberdctl (finally!), shutdown the server, switched back to external auth through my script, restarted, and authentication of the newly-created account seems to work fine.</p> <p>Does this explanation make sense or am I misunderstanding something?</p> <p>Thanks again.</p> Wed, 17 Dec 2008 02:29:13 +0000 jtschaff comment 53848 at https://www.ejabberd.im Some tests https://www.ejabberd.im/node/3313#comment-53847 <p>If you setup internal auth, registering accounts should work.</p> <p>If you setup extauth to the example auth script, written in Perl, it should work. You will need to make the script executable for the system user, etc.</p> <p>And then, if you wrote a script that works correctly, it should work.</p> <p>If your script doesn't work correctly, maybe you find another script in the the Contributions page written in the same language than yours, and you can use it as example.</p> Wed, 17 Dec 2008 00:05:00 +0000 mfoss comment 53847 at https://www.ejabberd.im