Drupal 7.x
Migration script from Drupal 5 to Drupal 7 programmatically
This post show you how you can migrate data from a Drupal 5 database to a Drupal 7. It might be some easier ways using some modules for export and import, but this is how you can make it the programmatically way. This is NOT a ready to go script this is more or less a copy of a script I just made, you have to code a bit to make it work.
How to create the password hashstring
If you have to create a new password for your admin user in a Drupal 7 database you can't use md5() as before, you have to implement a little script that print it out.
//add in index.php after drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
<?php
require_once 'includes/password.inc';
echo user_hash_password('mypassword');
exit;
?>