2009-08-29 18 views
3

私は2つのejabberdサーバーを持っていますが、ローカルの1つはfoobar.comでオンラインです。Xmpp ejabberdとadd-userコマンド

ローカルサーバーホスト名がEEPC

<iq to='eeepc' 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='eeepc' to='[email protected]/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> 

遠いサーバー

<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> 

である私は理解していない:私はテストのためのIQスタンザを送ることができるのXMPPピジンコンソールを使用して

なぜ私は、私はサーバーに受け入れるように指示する特定のオプションを見ることができなかったリモートからのコマンド?

答えて

1

おそらくmod_configureは、離れたサーバーにロードされていない可能性があります。 ejabberd管理シェルでlists:member(mod_configure, gen_mod:loaded_modules("foobar.com")).で確認できます。 foobar.comと[email protected]の間にs2s接続が必要ないので、リモートユーザであることは想像できません。

0

the mod_configure.erl source codeを見ると、リクエスタがその仮想ホストに対してconfigure privを持っているリクエスタがある場合にのみ、コンフィギュレーションアドホックコマンドが許可されることを確認するACLチェックがあるようです。デフォルトでは私はそうしないと思う。あなたが好きなものを追加する必要があり

acl:match_rule(LServer, configure, From) 

...

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

...あなたのejabberd.cfgファイルへ。