3
votes

I have two ejabberd servers, one local one distant online on foobar.com.

Using xmpp pidgin console i can send iq stanzas for tests:

Local server hostname is eepc

<iq to='eeepc' from='greg@eeepc' id='get-registred-users-num-1' type='set'>
    <command xmlns='http://jabber.org/protocol/commands' action='execute' node='http://jabber.org/protocol/admin#get-registered-users-num'/>

</iq>

<iq from='eeepc' to='greg@eeepc/3493331071251540036345753' id='get-registred-users-num-1' type='result'>
    <command xmlns='http://jabber.org/protocol/commands' sessionid='2009-08-29T14:01:55.714639Z' node='http://jabber.org/protocol/admin#get-registered-users-num' status='completed'>
        <x xmlns='jabber:x:data'>
            <field type='hidden' var='FORM_TYPE'>
                <value>http://jabber.org/protocol/admin</value>
            </field>
            <field type='text-single' label='Number of registered users' var='registeredusersnum'>
                <value>7</value>
            </field>
        </x>
    </command>
</iq>

Distant Server

<iq to='foobar.com' from='[email protected]' id='get-registred-users-num-1' type='set'>
    <command xmlns='http://jabber.org/protocol/commands' action='execute' node='http://jabber.org/protocol/admin#get-registered-users-num'/>
</iq>

<iq from='foobar.com' to='[email protected]/36523779951251567671615394' id='get-registred-users-num-1' type='error'>
    <command xmlns='http://jabber.org/protocol/commands' action='execute' node='http://jabber.org/protocol/admin#get-registered-users-num'/>
    <error code='404' type='cancel'>
        <item-not-found xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
    </error>
</iq>

I don't understand why i get a , i could not see any particular options to tell the server to accept commands from remote ?

2

2 Answers

1
votes

Maybe mod_configure is simply not loaded on the distant server. You can check via lists:member(mod_configure, gen_mod:loaded_modules("foobar.com")). in an ejabberd admin shell. I cannot imagine that this is about being a remote user, because no s2s connection is needed between foobar.com and [email protected].

0
votes

Looking in the mod_configure.erl source code there seems to be an ACL check to make sure the configure adhoc commands are only allowed when the requester is on a user account has configure priv on that virtual host. By default I think they don't.

acl:match_rule(LServer, configure, From)

You may need to add something like...

{access, configure, [{allow, [email protected]}]}.

...to your ejabberd.cfg file.