I don\'t really need to import any data into my D7 build other than users. I have (by SQL) imported my user data however, the D7 password encryption method is now different.
I don't have enough points to add a comment, but I've made several refinements to hross' answer (and submitted a draft update).
Here's an improved script with documentation and the ability to specify a non-default users table for those doing manual Drupal 6 to 7 merges. It also incorporates jpb's checking.
10 ORDER BY uid", 0, $count);
foreach ($result as $account) {
$has_rows = TRUE;
if (substr($account->pass, 0, 1) != 'U') {
echo "updating account: " . $account->uid . " \r\n";
$new_hash = user_hash_password($account->pass, $hash_count_log2);
if ($new_hash) {
// Indicate an updated password.
$new_hash = 'U' . $new_hash;
db_update($databasename)
->fields(array('pass' => $new_hash))
->condition('uid', $account->uid)
->execute();
}
}
}
echo "Done.";
?>