title: asmack XMPP new user registration
body: <p>Good people of StackOverflow, please help.
  I've set up an ejabberd server on my ubuntu machine, added virtual host, set
      {access, register, [{allow, all}]}. 
  and registered an admin account. I'm not a linux guru, but I've managed to do this basic set up.
  Now, from my Win 7 machine, using Pidgin, I can login as admin and have access to many administrative features. Most important I can create new users on the server.
  The problem is that I can't do that with my android client using asmack library. I can establish connection and login, but when I try to register a new user either trough account manager or by sending IQ packets I get forbidden(403) response error.</p>
  
  <pre><code>AccountManager am = new AccountManager(connection);
  Map&lt;String, String&gt; attributes = new HashMap&lt;String, String&gt;();
  attributes.put("username", "my_user_name");
  attributes.put("password", "my_password");
  attributes.put("email", "foo@foo.com");
  attributes.put("name", "my_full_name");
  am.createAccount("my_user_name", "my_password", attributes);
  
  
  Registration reg = new Registration();
  reg.setType(IQ.Type.SET);
  reg.setTo(connection.getServiceName());
  //      attributes.put("username", username);
  //      attributes.put("password", password);
  //      reg.setAttributes(attributes);
  reg.addAttribute("username", username);
  reg.addAttribute("password", password);
  reg.addAttribute("email", email);
  reg.addAttribute("name", fullName);
  PacketFilter filter = new AndFilter(new PacketIDFilter(
      reg.getPacketID()), new PacketTypeFilter(IQ.class));
  PacketCollector collector = connection.createPacketCollector(filter);
  connection.sendPacket(reg);
  </code></pre>
  
  <p>Has anyone had similar problems or can tell me what am I doing wrong?</p>
  
  <p>Thanks</p>
  
  <p>Here is my LogCat</p>
  
  <pre><code>10-10 10:00:26.249: DEBUG/StatusBarPolicy(1639): [BRIGHTHY] curNetwork=22003 curHPLMN=22003
  10-10 10:00:26.839: INFO/System.out(21277): 10:00:26 AM SENT (1080244736): &lt;iq id="fMJxx-4" to="morena.local" type="get"&gt;&lt;query xmlns="jabber:iq:register"&gt;&lt;/query&gt;&lt;/iq&gt;
  10-10 10:00:26.869: INFO/System.out(21277): 10:00:26 AM RCV  (1080244736): &lt;iq from='morena.local' to='admin@morena.local/Smack' id='fMJxx-4' type='result'&gt;&lt;query xmlns='jabber:iq:register'&gt;&lt;instructions&gt;Choose a username and password to register with this server&lt;/instructions&gt;&lt;username&gt;admin&lt;/username&gt;&lt;password/&gt;&lt;registered/&gt;&lt;/query&gt;&lt;/iq&gt;
  10-10 10:00:26.959: INFO/System.out(21277): 10:00:26 AM SENT (1080244736): &lt;iq id="fMJxx-5" to="morena.local" type="set"&gt;&lt;query xmlns="jabber:iq:register"&gt;&lt;password&gt;new_user&lt;/password&gt;&lt;username&gt;new_user@morena.local&lt;/username&gt;&lt;/query&gt;&lt;/iq&gt;
  10-10 10:00:26.969: INFO/System.out(21277): 10:00:26 AM RCV  (1080244736): &lt;iq from='morena.local' to='admin@morena.local/Smack' id='fMJxx-5' type='error'&gt;&lt;query xmlns='jabber:iq:register'&gt;&lt;password&gt;new_user&lt;/password&gt;&lt;username&gt;new_user@morena.local&lt;/username&gt;&lt;/query&gt;&lt;error code='403' type='auth'&gt;&lt;forbidden xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/&gt;&lt;/error&gt;&lt;/iq&gt;
  10-10 10:00:31.659: WARN/System.err(21277): forbidden(403)
  10-10 10:00:31.659: WARN/System.err(21277):     at org.jivesoftware.smack.AccountManager.createAccount(AccountManager.java:246)
  10-10 10:00:31.659: WARN/System.err(21277):     at org.jivesoftware.smack.AccountManager.createAccount(AccountManager.java:207)
  10-10 10:00:31.659: WARN/System.err(21277):     at org.me.my_project.FriendProfileActivity.connectToServer(FriendProfileActivity.java:698)
  10-10 10:00:31.659: WARN/System.err(21277):     at org.me.my_project.FriendProfileActivity.connectLogin(FriendProfileActivity.java:578)
  10-10 10:00:31.659: WARN/System.err(21277):     at org.me.my_project.FriendProfileActivity$2.run(FriendProfileActivity.java:433)
  10-10 10:00:31.659: INFO/System.out(21277): 10:00:31 AM SENT (1080244736): &lt;iq id="fMJxx-6" to="morena.local" type="get"&gt;&lt;query xmlns="jabber:iq:register"&gt;&lt;/query&gt;&lt;/iq&gt;
  10-10 10:00:31.679: INFO/System.out(21277): 10:00:31 AM RCV  (1080244736): &lt;iq from='morena.local' to='admin@morena.local/Smack' id='fMJxx-6' type='result'&gt;&lt;query xmlns='jabber:iq:register'&gt;&lt;instructions&gt;Choose a username and password to register with this server&lt;/instructions&gt;&lt;username&gt;admin&lt;/username&gt;&lt;password/&gt;&lt;registered/&gt;&lt;/query&gt;&lt;/iq&gt;
  10-10 10:00:31.689: INFO/System.out(21277): 10:00:31 AM SENT (1080244736): &lt;iq id="fMJxx-7" to="morena.local" type="set"&gt;&lt;query xmlns="jabber:iq:register"&gt;&lt;email&gt;some@some.com&lt;/email&gt;&lt;password&gt;new_user1&lt;/password&gt;&lt;username&gt;new_user1@morena.local&lt;/username&gt;&lt;name&gt;new_user1@MORENA.LOCAL&lt;/name&gt;&lt;/query&gt;&lt;/iq&gt;
  10-10 10:00:31.699: INFO/System.out(21277): 10:00:31 AM RCV  (1080244736): &lt;iq from='morena.local' to='admin@morena.local/Smack' id='fMJxx-7' type='error'&gt;&lt;query xmlns='jabber:iq:register'&gt;&lt;email&gt;some@some.com&lt;/email&gt;&lt;password&gt;new_user1&lt;/password&gt;&lt;username&gt;new_user1@morena.local&lt;/username&gt;&lt;name&gt;new_user1@MORENA.LOCAL&lt;/name&gt;&lt;/query&gt;&lt;error code='403' type='auth'&gt;&lt;forbidden xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/&gt;&lt;/error&gt;&lt;/iq&gt;
  10-10 10:00:31.729: WARN/System.err(21277): forbidden(403)
  10-10 10:00:31.729: WARN/System.err(21277):     at org.me.my_project.utilities.CreateChatAccount.createAccount(CreateChatAccount.java:100)
  10-10 10:00:31.729: WARN/System.err(21277):     at org.me.my_project.utilities.CreateChatAccount.createAccount(CreateChatAccount.java:143)
  10-10 10:00:31.729: WARN/System.err(21277):     at org.me.my_project.FriendProfileActivity.connectToServer(FriendProfileActivity.java:706)
  10-10 10:00:31.729: WARN/System.err(21277):     at org.me.my_project.FriendProfileActivity.connectLogin(FriendProfileActivity.java:578)
  10-10 10:00:31.729: WARN/System.err(21277):     at org.me.my_project.FriendProfileActivity$2.run(FriendProfileActivity.java:433)
  </code></pre>