Xmpp ejabberd and add-user command

I have two ejabberd servers, one local, remote online at foobar.com.

Using the xmpp pidgin console, I can send iq stanzas for tests:

Local server hostname 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>

Remote server

<iq to='foobar.com' from='greg@foobar.com' 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='greg@foobar.com/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 don’t see any specific parameters to tell the server to accept commands from the remote?

+3
source share
2 answers

, mod_configure . lists:member(mod_configure, gen_mod:loaded_modules("foobar.com")). admin ejabberd. , , , s2s foobar.com greg@foobar.com.

+1

mod_configure.erl, , ACL , configure adhoc , , . , .

acl:match_rule(LServer, configure, From)

- ...

{access, configure, [{allow, greg@foobar.com}]}.

... ejabberd.cfg.

0

Source: https://habr.com/ru/post/1716400/


All Articles