Have you seen this discusssion? http://moodle.org/mod/forum/discuss.php?d=18103
These seem to be the solutions that to work best:
In the table mdl_user
as a password. Because MD5("") = d41d8cd98f00b204e9800998ecf8427e, so now your password is a empty string. Then login with nothing in the password field.
Thanks to Seiti Yamashiro - Tuesday, 20 March 2007, 11:08 PM
If all else fails and you can access the database via phpMyAdmin, go to the mdl_user table and copy the guest password into the Admin password field. It is encrypted, but the default password for Guest is "guest". You can then log in and change the password. That should get you out of trouble.
Colin Fraser - Friday, 11 February 2011, 07:27 AM
This is what worked for me :
Click on the moodle database on the left.
In the new window, in the list on the left, find the table mdl_user (it may be on a following page)
Select the file to edit with the "pen" icon.
Change the username to whatever you want but not "admin" (on an online site because of security risk)
Change the password to: guest
Click on the "Go" button at the bottom of the screen.
Log in to your Moodle site with the password "guest"
Change the password in your profile to a very strong one.