Communicate with User's data

Hi all.

I'd looked through this forum to find any similar situation that I'm having. I intend to install Ejabberd on my UNIX box which is also running a community site.

I would like to integrate the user's database (username/password).

So I did installed Ejabberd on my WinXP PC to test it and also to study the database structure. But it seems, I can't find anything related to user's data.

Is there any Perl module that had already been created for this? I would like my script to communicate with Ejabberd user's data. So that it will synchronise whenever a user change their password and a new registration.

ejabberd module with XML-RPC interface

I would like my script to communicate with Ejabberd user's data. So that it will synchronise whenever a user change their password and a new registration.

There is nothing right now that does exactly what you need, but with little work you can have it.

Instead of modifying the ejabberd database on your own, why not communicate with ejabberd and request him to create, remove or change passwords? This way your programs are invulnerable to database structure changes, and are even server independent.

I wrote a module for ejabberd that starts a XML-RPC server and waits for external requests. Those requests could be: create user, remove user, change password, check password, check user exists... This way you can write your program in any language, and send requests via XML-RPC to ejabberd.

Hi badlop. Thanks for this

Hi badlop.

Thanks for this great help. Where can I get the module? And other than HTML& CGI/Perl, my knowledge with any other computer language is nearly zero. I'm not sure what this XML-RPC is all about but I will read it after this.

All my scripts are written in Perl, so I just need to write few scripts to send a command to your module for:

1. Create new user with password
2. User change password
3. User change nickname
4. Import all existing user's to Ejabberd database (username + password).

Is there anything else that I should also think of? Hope to hear from you soon. :)

Regards.

other than HTML& CGI/Perl, my

other than HTML& CGI/Perl, my knowledge with any other computer language is nearly zero

No problem, just start goggling for examples of Perl scripts that queries XML-RPC.

3. User change nickname

Do you mean, to change the vCard nickname?

4. Import all existing user's to Ejabberd database (username + password).

It seems easier that you just call several times 1., right?

Clarify me points 3 and 4 so I can improve the module.

Hi badlop. Thanks again for t

Hi badlop. Thanks again for the reply.

Please ignore the no.3, cause at first I thought of letting the members be able to change their nickname thru the web. But I think, this is very-very not important at all. It's more fun to be able to change nickname instantly using messenger and not thru web.

For the no.4, I'm already running a community site with thousands of members. Now, I wanna provide them with messenger service. When everything is ready, I need to import all the existing members data (username+password) to ejabberd server so that they can login right away with their new instant messenger.

hay badlop plz add me on

hay badlop plz add me on msn messenger
i have few question that i want to solve online
plz ad me

shani1997@hotmail.com

i will wait for u.

I am not your slave.

usmaan wrote:

hay badlop plz add me on msn messenger
i have few question that i want to solve online
plz ad me

shani1997@hotmail.com

i will wait for u.

I am not your personal servant, neither your slave. I will not add you.

If you have a problem, start a new thread in the forum or in the mailing list.

You probably also want to respect the basic rules of communication in Open Source and Free Software projects, Internet forums, Netiquette, etc.

hi badlop Thanks for

hi badlop

Thanks for reminding me i was in a trouble thats y i ask u to add me.ok i will start a new thread and will wait for your responce

ejabberd_ctl patch to create user and change pass

I've reread your requirements and I found an easier solution. This unofficial patch for ejabberd_ctl adds several commands, and some of them are exactly what you are seeking.

With that patch, you have two new command line options for ejabberd_ctl:

register user password
set-password user password
So there's no need for XML-RPC at all, just a command line call!

change password at command line

Hello,

I'm on debian etch and wanted to find a command line solution that did not require patches.

I have figured out the following commands which change a user's password (requires root access to read the cookie file):

echo 'ejabberd_auth:set_password("username", "servername", "password").' \
  | HOME=/var/lib/ejabberd erl_call -sname ejabberd@nodename -e

-or-

echo 'ejabberd_auth:set_password("username", "servername", "password").' \
  | erl_call -c `cat /var/lib/ejabberd/.erlang.cookie` -sname ejabberd@nodename -e

The two commands should be equivalent, they just illustrate two methods for getting the erlang cookie.

I hope someone finds this useful!

Syndicate content