In Trouble

In Trouble

by joseph zabrosky -
Number of replies: 14

Hi, 

I contracted a developer who ended up hacking into certain sites i was involved with. I managed to change my passwords on my hosting, main site, PayPal etc, but in the hustle and bustle of it all forgot to change my password for moodle admin, thus can no longer log in as he changed it.

Is there a way to change my password via bluehost on my server using the root directory or some other means? 

Or perhaps there's something that can be done via Moodle itself.

Thanks for your help,

joseph

Average of ratings: -
In reply to joseph zabrosky

Re: In Trouble

by Charan Sri -


Hi Joseph,

You can change your Moodle password by accessing database through PHPMyadmin. You can change password at 'mdl_user' table.

In reply to Charan Sri

Re: In Trouble

by joseph zabrosky -

Charan,

As you can see in the attached i was able to get to mdl_user, but my hosting told me the entry in the 'Value' box is probably encrypted thus he wasn't sure how to change the password. Would I put the new password for admin in the Value box after deleting what's presently in there, or would i go into the 'Function' drop down and choose 'Password' and then enter the new password in the 'Value' box? Or something different?

Thanks, joseph

Attachment Screen Shot 2017-05-03 at 3.46.59 PM.png
In reply to joseph zabrosky

Re: In Trouble

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers

Have you tried Moodle's "forgot your password" tool?

In phpMyAdmin, it appears that you are at the Insert tab.  I think that you want to be at the browse, then edit tab.  (It's been a while since I had to do this.)


In reply to Rick Jerz

Re: In Trouble

by joseph zabrosky -

I did try the forgot your password tool and was able to login as a user of the course but not as admin which is what i need.

I went to

1. PHPmyAdmin

2. Chose my Database which has the acronym of the course in it

3. Chose 'admin' which was the second entry

4. This enabled me to get to 'password' as shown in the screenshot

Thanks for your input, joseph

In reply to joseph zabrosky

Re: In Trouble

by Charan Sri -

Select the password 'Function' as MD5 and then enter your password.

In reply to Charan Sri

Re: In Trouble

by joseph zabrosky -

Thank you so much Charan!!!! You're a life saver. God Bless YOU!!!!

In reply to joseph zabrosky

Re: In Trouble

by Charan Sri -

Good Luck & Thank you!!!

In reply to Charan Sri

Re: In Trouble

by joseph zabrosky -

Charan, 

The hacker was able to get back in as he apparently rigged the user login - see attached.  By mistake I logged in even though i was given the prompt that you see in the attached, thus he got back in.

I went back into server and changed password again.

So, the new question is what is the best way to secure user login in moodle?

Thanks,

joseph

Attachment Screen Shot 2017-05-10 at 3.47.42 PM.png
In reply to joseph zabrosky

Re: In Trouble

by Marcus Green -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

If you have command line access you can change a password using admin\cli\reset_password.php

Average of ratings: Useful (1)
In reply to joseph zabrosky

Re: In Trouble

by Christoph Ruda -

Hi Joseph,

Here is what I did when I had to reset my admin password:

  1. In phpmyadmin identify the admin user id - you have done that, it's 2.
  2. Select the table called mdl_user_preferences
  3. Search the data for user id 2
  4. Change the value for auth_forcepasswordchange from 0 to 1 and save the table


The next time you log in as admin you should be asked for a new password. I hope this works for you too.

Christoph


Average of ratings: Useful (2)