I’ve had to do this a few times and always used a custom plugin which I run by placing a tag in a temporary template.
The entire code is beyond the scope of a quick reply, but the things to do would be:
1. Get your existing users from a db table or CSV
2. Loop them
3. build up db insert arrays and insert a member using
$this->EE->member_model->create_member( $array_for_exp_members, $array_for_custom_fields )
Don’t immediately give up on retaining passwords either. If the existing one is available, you may well be able to use it. Many old systems use unsalted md5 strings and this can be copied straight over.
A more complex salted encryption may well be supported if you can find the salt. Check out the recent Auth library for what EE does these days.
If I’m not able to recycle passwords I generate a new one using Auth::hash_password() just before insert and save them to a new CSV along with email address. These can then be distributed in whatever way seems best.