by Scott Karren.
Ruth,
I've had this happen to me occasionally when migrating from old hardware to new hardware or when I am copying from production to test servers. If you have access to the user table this is what I do.
1. go to http://www.md5hashgenerator.com/index.php and enter the password you want to use for the admin account. Click generate md5 hash.
2. Copy the resulting md5 hash and go to your Moodle user table.
3. Locate your admin user, usually id 2.
4. Update the password field to reflect the md5 value from above.
5.Go back to your site and login.
Edit: Just re-read your original post and I agree with Bret, you will need to change the password salt. My instructions will reset the admin password only.
Scott