Do you have weak and often failing memory as I do? And what worse, have you forgotten password you are accessing your beloved Moodle with? It is catastrophe! Really?
I assume you know, that Moodle can send you new password in case you have forgotten the old one when you provide username or email you registrated.
But what to do, if you have forgotten absolute everything or your Moodle is not sending emails? (Maybe you are trying Moodle on your localhost without smtp settings etc.)
If you have access to database (phpmyadmin is most used) you are saved.
You need to run this query:
UPDATE `mdl_user` SET password = md5('newpassword') WHERE username = 'admin';
where newpassword is you new password and admin is a username of account you want to set that new password.
Or you can use this script from Shane Elliot:
- download it
- modify lines
$username = 'username';
$newpassword = 'newpassword';
- copy this file to your root moodle installation directory, same location as config.php and access this script with your browser (eg. "http://yourmoodleurl/passchange.php" )
I hope you regained your password and you are good to go with using Moodle once again ;).