Adding many users

I’m planning on moving from our current IM product to openfire and was wondering if there is anyway to create a file and import it to create all the user accounts. The current product just uses a flat text file so I can’t export it. I’m hoping to avoid creating all the users in the admin console if possible.

Also, is there a way to add multiple people to a group at the same time?

As long as Openfire is not running and you are not using the embedded database, you can modify the database directly. So you could write some kind of script which migrates to the new database. However, you did not say what “many” means for you.

Database guide may be helpful here: -guide.html

I have zero experience with any DBs. I did install a basic mySQL DB to act as the backend for Openfire since it was so highly recommended but all I did was follow the directions. Scripting may be a little deeper than I want, or have time, to get. There are about 200 users I need to add and around 12 groups that they need put into. Is there a repository of scripts someone has used before for different tasks?

userservice plugin?

qbakies wrote:

Also, is there a way to add multiple people to a group at the same time?

It was possible with older version, but somehow this option has disappeared.

The user service plugin looks like it may be useful but I’m not sure of how it’s used exactly. I read through the info document on it and it states that you can use http requests to create users. Two stupid questions:

  1. In the example for adding a user it had the display name as name=franz but what if I wanted the name to Frank Ranz. How would I do that since spaces aren’t allowed in http? Would it be name=“Frank Ranz” or name=Frank%Ranz ?

  2. I don’t know how I would actually send this request myself unless I just typed it into the address bar in a browser line by line. Is ther a way that I could make a text file with all the lines pre-typed and send it as a request so it made all of the users at once? It seems like typing every line into a browser would be just as bad as making them individually in the admin console. Am I missing something about the way you can use http requests?

@1.: Hm, never tried this plugin, but I would try to escape spaces. Just add an %20 for each space. Generally %HEXCODE of ASCII symbol.

See also

@2.: Everything you need is some kind of scripting language which is able to do HTTP-Requests. When using Linux you could write a simple BASH script which does use “wget and redirects output of wget to /dev/null. However, maybe Perl would be the better choice here, because it’s easier to parse your original database there.