Ejabbered Mysql Database Authentication from diffent Database rather default given in mysql.sql

Hi,

I have configured ejabbered server with mysql authentication. This is wrking perfectly well. However i need One help, i have installed database ejabbered and filled with default script mysql.sql. This is wrking with users tables with field name username and password.

However i want to use differnt database, having differnt name and fields. Is this possible ? Should i need to dig source and make changes into odbc and make this new source.

Please Help !!!!!

Thanks & Regards
Sachin Sharma

You can build your custom

You can build your custom auth script and tell ejabberd to use it as extauth. You can write that script in any language, and there are several examples: Authentication Scripts.

Re: You can build your custom

badlop wrote:

You can build your custom auth script and tell ejabberd to use it as extauth. You can write that script in any language, and there are several examples: Authentication Scripts.

This creates a lot more problems. I have it running and now I have 6 users online and ZERO registered users. There are many problems with presence and authorization between clients. Not to mention offline messages aren't stored because there are no registered users on the server at all.

Check it out:

http://aie.pl/img/temp/ejabberd-online-users.png
http://aie.pl/img/temp/ejabberd-users.png

Shouldn't it create a correct user structure for each authenticated user? Or even ask the extauth script for a list of registered users on some server events?

And the last and most important question for me:

Are you guys working on enhancing extauth or is it a low priority stuff? In the latter case I will simply move to other Jabeer server software and won't bug you again :)

But please, give me some info so I can plan on what to do next.

Re: You can build your custom

Martel wrote:

I have it running and now I have 6 users online and ZERO registered users.

That's normal, since there are no users registered on ejabberd itself.

Martel wrote:

There are many problems with presence and authorization between clients.

That isn't normal. Obviously, it should work correctly, and I'm sure because I use a virtual server with extauth and it works.

Those problems are probably not related to your extauth script, so they are either a strange bug on ejabberd, or a problem in the system. For example, maybe it's a problem with the MySQL database, either its fault, or ejabberd's fault.

Martel wrote:

Not to mention offline messages aren't stored because there are no registered users on the server at all.

Check it out:

http://aie.pl/img/temp/ejabberd-online-users.png
http://aie.pl/img/temp/ejabberd-users.png

This should work, since offline messages are stored on the database as I verified on an ejabberd server.

Martel wrote:

Shouldn't it create a correct user structure for each authenticated user?

Yes, and it should work correctly: roster, vcard, offline messages...

Martel wrote:

Or even ask the extauth script for a list of registered users on some server events?

And the last and most important question for me:

Are you guys working on enhancing extauth or is it a low priority stuff? In the latter case I will simply move to other Jabeer server software and won't bug you again :)

But please, give me some info so I can plan on what to do next.

If there are bugs that prevent extauth-enabled servers from working correctly (not offline messages, wacky rosters...) obviously it should be fixed.

But this time it seems more like a database problem, or the problem is mixing mysql + extauth.

Summarizing: if you make some experiments (for example, internal database+extauth, or mysql database without extauth) and find any solution, or you advance a little further on the deffinition of the possible bug... comment it here.

Otherwise, try another Jabber server.

First of all, thanks for

First of all, thanks for your reply badlop.

I'll try to describe it in more detail. I have an ejabberd server with extauth enabled on internal database. And because of this I have a hard time debugging it myself since I'm not familiar with erlang or it's mnesia database.

My extauth script asks my own mysql database for user credentials. This database is used only for this purpose - authenticating a user.

The problems I'm having are really strange sometimes. I will describe them in detail and as verbose as I can.

One day I was talking to other local user for a while when suddenly he gone offline. After this happened, every single message I have sent to him came back to me as a message in another window (gajim client).

There are times when two people try to subscribe to each other and both of them have subscribes pending and, as you probably guessed already, they don't receive each other's requests. ut when I login to webadmin I see some entries I can validate by hand. Observed mainly on Pandion but also on PSI and JAJC.

And some questions:

What happens when a person who is logged on tries to subscribe to another person who haven't logged to the system yet? I mean not even once. But is a valid user if asked through an extauth script?

And what happens to messages for those people?

You're telling me that a zero registered users is a normal thing for an auth script. Why is it normal? You have to keep some data for those clients in ejabberd database so in my opinion it should at least report which clients have a working structure already. How is it supposed to know if the offline message has a valid recipient if it doesn't know if he's registered or not?

More to come.

Can we discuss it further by email? My address is martel [at] post.pl

Re: First of all, thanks for

Martel wrote:

Can we discuss it further by email? My address is martel [at] post.pl

You can try the ejabberd mailing list.

server.com/announce/all does

server.com/announce/all does not work at all
server.com/announce/online works as expected

Thanks sander. I will use it with my next problem. I will keep this problem in one place for now.

Extauth + odbc

I also have problems with users authorization using MySQL database. I use roster_odbc. All other odbc things are not interesting for me. Also I need to authorize users using other database. I made perl script for extauth, but in case I don't define odbc auth for my domain - contact list from rosterusers & rostergroups table are not available. But if I define:
{host_config, "myhost.com", [{auth_method, [external, odbc]}]}.
it become possible to login simply defining some string as a password.

Could you help me in this case?

Alouette.

Syndicate content