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

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...