I need to convert a commercial installation of Jabber, and it's spool directory is very different from a Jabber 1.4. I've got a script that I can use to create the users by parsing the XML in the spool directory and adding the user through ejabberdctl. The roster is what I am having a difficult time with. In the web based utility, as an administrator I can modify a roster (html://localhost:5280/admin/user//roster/) Adding the rosters for 3500+ users by hand isn't a job I long for. Is there a way to administrate rosters from the commandline? I've tried dumping the database to a text file, but uploading that same file doesn't seem to work either.
Thanks,
Rich
patch to add roster items on command line
Not in current ejabberd.
You can try ejabberdctl-extra, it adds a new option to ejabberd_ctl, so you can make something like:
And it adds mike@server.com to your local user 'peter' roster, with nick 'MiKe', on the group 'Employees' and subscription type 'both'.Note that it only adds one roster item. You will probably need to add the other roster item if he's a local user: add peter@myserver.com to your local user mike. This tool does NOT allow spaces in names, so you must ensure there're no groups or nicks with spaces.
Give it a try
If you allow it, this script
If you allow it, this script can be maybe included in the ejabberd distribution in the tools directory...in that case create a bugzilla entry or send it to the mailing list. :-)
--
sander
RE:patch to add roster items on command line
We were able to add 6000+ registered users from the commercial version of Jabber into eJabber, and so far things are running fairly well. The only problem is that the rosters show the users configured as being "Not Authorized." Is there something we can do to the database to set these as "authorized?" There are some clients such as Exodus that doesn't handle this very well.
Thanks for all your help,
Rich
this experimental patch...
The patch worked great and the rosters were added just fine. The only problem is that the Pending field in the database states that it's 'out' so the users rosters all appear to be pending. Is there a way to change this so that the Pending field is set to 'none'?
I really appreciate the help you all have provided so far. eJabber is an awesome server, and we love it compared to the commercial version of Jabber.
Thanks,
Rich
You're right, on ejabberd_ctl
You're right, on ejabberd_ctl.erl, the line that says
should say I've updated my patch.You can do this:
I've verified that you will not get duplicated roster items. Probably the new roster items replace the old ones, so if your users modified them they'll lose the changes (nickname and group).
Thanks... That worked. VCard?
THanks that worked!!!
Rich