diff --git a/modules/user/user.install b/modules/user/user.install
index 75fca65..c3109c2 100644
--- a/modules/user/user.install
+++ b/modules/user/user.install
@@ -421,7 +421,11 @@ function user_update_7000(&$sandbox) {
     $result = db_query_range("SELECT uid, pass FROM {users} WHERE uid > 0 ORDER BY uid", $sandbox['user_from'], $count);
     foreach ($result as $account) {
       $has_rows = TRUE;
-      $new_hash = user_hash_password($account->pass, $hash_count_log2);
+      $new_hash = FALSE;
+      // Don't generate a new hash if the string already looks like a secure hash.
+      if ($account->pass[0] != '$' && ($account->pass[0] != 'U' && $account->pass[1] != '$')) {
+        $new_hash = user_hash_password($account->pass, $hash_count_log2);
+      }
       if ($new_hash) {
         // Indicate an updated password.
         $new_hash  = 'U' . $new_hash;
