Best way to mass assign portal user accounts?

Hi everyone.

We are starting to use the Sugar Portal for case management. But we have 40,000 contacts in the system, most of which will need to be setup with a portal login.

Is there any way to mass automate the signup process? We do not allow them to register on the site (as they typically already have a contact) but would need to assign them a username/password.