General help

 
 
Picture of Ramakrishna Krishnavajjala
Reset Moodle Adminstrator Password from command line
 

I am stuck with reseting moodle site administrator password .. Need some help with that .. The only way we could do is by backend ... It would a great help if someone help me out in detailed procedure .. 

 

Thanks

RK

 
Average of ratings: -
Picture of tim st.clair
Re: Reset Moodle Adminstrator Password from command line
 

I think what you can do is take an md5 of a string concatenated with the password salt which is defined in the config.php and paste it into the password field for your admin user, using a sql manager tool.

something like

md5 -s mypassword&R^F^&F^7FD8saltkey78f789ds

it will spit out a value which looks like

6217fbfde7e7034857b58ed27e947afe

you pop that in your database, and hopefully you should be able to log on.

 
Average of ratings: -
Picture of SJ K
Re: Reset Moodle Adminstrator Password from command line
 

Hi RK,

Try this stackoverflow post.

 
Average of ratings: -
Picture of Ken Task
Re: Reset Moodle Adminstrator Password from command line
Group Particularly helpful Moodlers

What version of Moodle?  If version 2, there is a command line utility that will do just that in moodlecode/admin/cli/ called reset_password.php.

To run: php reset_password.php from terminal prompt.  Opening that file in a text editor will show comments contained therein.

'spirit of sharing', Ken

 
Average of ratings: -