[ejabberd] mod_adhoc stopped working in 2.0.2_2?

Badlop badlop at gmail.com
Thu Oct 16 19:02:43 MSD 2008


On Thu, Oct 16, 2008 at 8:55 AM, Arne Claassen <arne at getorganyzd.com> wrote:
> I have a server on 2.0.1 and testing a new server on 2.0.2_2. On the new
> server I don't get the adhoc commands as admin anymore. They were even there
> at one point, but then i started working on clustering and while my admin
> users can still log in to the web admin, the in-band adhoc commands are all
> gone. Any suggestion what might have happened there? I've tried wiping the
> DB and starting a fresh instance, but admin users just aren't getting the
> commands back.

Short answer: make sure mod_configure and mod_adhoc are defined in
ejabberd.cfg and Web Admin. Also check ejabberd.log and sasl.log for
error messages.

Long answer:
The adhoc commands are implemented in mod_configure. This module
requires mod_adhoc to be enabled. When both modules are enabled in a
vhost, and a user requests commands of that host, mod_configure checks
if the user has enough privileges to see and execute the admin
commands.

mod_configure and ejabberd_web_admin use the same method to check the
user permissions: the Access rule 'configure'.

It is defined in the default ejabberd.cfg:
{access, configure, [{allow, admin}]}.

And you probably also have defined several accounts as 'admin':
{acl, admin, {user, "tom", "example.org"}}.

So, if 'tom at example.org' can browse in the Web Admin, he should also
see the adhoc commands. The only possibility is that mod_configure or
mod_adhoc are disabled in that vhost, or they crashed and are not
working.

You should check in your ejabberd.cfg that both modules are defined;
in Web Admin that both modules are enabled; in ejabberd.log and
sasl.log that there aren't any error messages about those modules.

The log files may report some error message either when ejabberd is
started, or when a user requests available adhoc commands.

I tried ejabberd 2.0.2_2 linux 32bits installer and also ejabberd
trunk SVN. In both cases adhoc commands are shown correctly to an
admin.


---
ProcessOne


More information about the ejabberd mailing list