Forum OpenACS Q&A: Migrating users from one site to another with same password ?

Hi all,

I have installed another server in my network (openacs 5.1.5, postgres 7.3.4) apart from the existing one. I want to migrate the users to the new server from earlier one without disturbing users (i.e. without sending mails to users about their password login etc).
I have made the csv file containing the users info (mail, first name, last name, encrypted password etc). When I try to upload this file to new server using "Bulk User add" facility, users are added into new server but; it sends mail to respective users & generates random passwords for them.

Can anybody knows how to disable the feature of sending mail to users & generating random passwords and how to preserve the same password (which I uploaded from csv file) for the respective user ?

Thanks in advance

Ratnakar

why don't you dump your database and just run the same service in the other place? if that is not what you're looking for, you need to export/import the passwords, that should be easy though there isn't a UI for doing that AFAIK.
Hi Ratnakar,

There is a paremeter in config.tcl which you can use to redirect all mails to your id. Sorry, but I can't remember what it is.

You can also try this -
Go to Control Panel, open Main Site parameters.
Edit EmailRegistrationConfirmationToUserP
RegistrationProvidesRandomPasswordP.

This is how I copied the passwords -
I first uploaded the users, then created another table users2 from the cvs file. This contains the email id, password and salt.
Then I copied the password and salt from users2 to users table.

Hope this helps
Nitish

the bulk add facility doesn't let you load an encrypted password from the "original" site since it uses one way encryption. One way you can do this is load all the people via bulk add, and then create an update script that you run through psql. What you want to do on the old system is get both the password and salt from the old users and set them for the new users. Now, assuming that username is unique (which it should be) and the same on both systems, you can then do this:

psql -t -c "
select 'update users set password = ''' ||
       password || ''', salt = ''' ||
       salt || ''' where username = ''' ||
       username || ''';'
  from users
" OLDDBNAME > update_users.sql

This creates a file update_users.sql which you should then run on the new server copying it there and doing this:

psql -f update_users.sql NEWDBNAME

That should do it...