[jadmin] adding user to mysql
Christian Vogel
vogel at pi2.physik.uni-erlangen.de
Wed Jul 5 12:37:33 CDT 2006
Hi,
On Wed, Jul 05, 2006 at 12:38:31PM +0200, Marcin Mazurek wrote:
> > since adding user is not simply Insert a record in jiveRoster.
> > I think even userservice will call some of the intenal wildfire module for
> > adding.
> I see, what I'm looking for in jabberd2 is possibility to block auto
> registration of users by themselves, and allowing admin (or via sql
> script) to create new users.
That's exactly what's currently configured on my toy-server:
------- c2s.xml -------
<!-- Registration configuration -→
<register>
<!-- Account registration is enabled by default (provided the
auth/reg module in use supports it). Comment this out to
disable. -→
<!-- <enable/> -→
------- sm.xml -------
<!-- User options -->
<user>
<!-- By default, users must explicitly created before they can start
a session. The creation process is usually triggered by a c2s
component in response to a client registering a new user.
Enableing this option will make it so that a user create will
be
triggered the first time a non-existant user attempts to start
a session. This is useful if you already have users in an
external authentication database (eg LDAP) and you don't want
them to have to register. -->
<auto-create/>
Now I just insert an arbitrary user into my jabber users table:
mysql> insert authreg (username,realm,password)
values ('testuser','jabber.mydomain','xxxyyyzzz');
Query OK, 1 row affected (0.04 sec)
and when I connect to the jabber-server, the xm.log shows me:
Wed Jul 5 17:41:20 2006 [notice] created user: jid=testuser at jabber.mydomain
Wed Jul 5 17:41:20 2006 [notice] session started:
jid=testuser at jabber.mydomain/Psi
works quite nice.
Chris
More information about the JAdmin
mailing list