2009-08-29 2 views
3

foobar.com에서 하나의 로컬 온라인 서버 인 두 개의 ejabberd 서버가 있습니다.Xmpp ejabberd 및 add-user 명령

사용 XMPP의 피진 콘솔 내가 테스트를 위해 IQ 스탠자를 보낼 수 있습니다

로컬 서버 호스트 이름은 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> 

이해가 안이다 왜 내가 얻을, 나는 서버를 수락 할 수있는 특정 옵션을 볼 수 없습니다 원격 명령?

답변

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에서 ACL을 확인한 것 같습니다. 구성 요청 adhoc 명령은 요청자가 해당 가상 호스트에서 구성 권한을 가진 사용자 계정에있는 경우에만 허용됩니다. 기본적으로 그들은 그렇게 생각하지 않습니다. 당신이 좋아하는 무언가를 추가해야 할 수 있습니다

acl:match_rule(LServer, configure, From) 

...

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

... 당신의 ejabberd.cfg 파일.