title: Keycloak - Create Admin User in a Realm
body: <p>How do I create an admin user in a realm in Keycloak? I tried <code>/bin/add-user.sh -r myrealm -u admin -p &lt;pwd&gt;</code>
  It gave me the error:</p>
  
  <pre><code>
   * Error *
  WFLYDM0065: The user supplied realm name 'myrealm' does not match the realm name discovered from the property file(s) 'ManagementRealm'.
  
  Exception in thread "main" org.jboss.as.domain.management.security.adduser.AddUserFailedException: WFLYDM0065: The user supplied realm name 'myrealm' does not match the realm name discovered from the property file(s) 'ManagementRealm'.
      at org.jboss.as.domain.management.security.adduser.ErrorState.execute(ErrorState.java:72)
      at org.jboss.as.domain.management.security.adduser.AddUser.run(AddUser.java:133)
      at org.jboss.as.domain.management.security.adduser.AddUser.main(AddUser.java:231)
      at org.jboss.modules.Module.run(Module.java:352)
      at org.jboss.modules.Module.run(Module.java:320)
      at org.jboss.modules.Main.main(Main.java:593)
  </code></pre>
  
  <p>I tried  <code>/bin/add-user-keycloak.sh -r myrealm -u admin -p &lt;pwd&gt;</code>. It asked me to restart the server which I did but I did not see the user either.</p>
  
  <p>If one knows how to make it using the python client, that would be great too.</p>