[MediaWiki-l] Reset MediaWiki password without email

Chris Steipp csteipp at wikimedia.org
Fri Oct 3 18:41:13 UTC 2014

It could be the user object in your cache. Try eval.php to do something like:

> $u = User::newFromName( 'someuser' );

> $u->setPassword( 'somepass' );

> $u->saveSettings();

On Wed, Sep 24, 2014 at 11:23 PM, Tongjie Li <snow8261 at gmail.com> wrote:
> hi,all
>        I have a question of how to reset MediaWiki password without email.I
> post it in stackoverflow, but maybe it is be better asked here.
>      We set up a MediaWiki server for organizing docs.One of our customers
> forget his password.We need to reset the password for him.
> In the MediaWiki docs
> <http://www.mediawiki.org/wiki/Manual:Resetting_passwords> ,there are three
> ways to do it:
> First is to reset by email. Since we do not have a mail server,we can't
> done with it.
> Second is using changePassword.php, we try it. But we found other account
> can be changed successfully,but not this account. After the script runs,
> the new password is still not working.
> Third is using direct database modification,since our version is 1.22.
> still other account can be changed, but not this account. After update the
> database,the user cannot login in with new password. sql as foolow:
> UPDATEuserSET user_password = CONCAT(':B:somesalt:',
> MD5(CONCAT('somesalt-', MD5('somepass')))) WHERE user_name = 'someuser';
> We have no idea why is this happen? Will be MediaWiki bug? Is there any log
> that I can check?  Is anyone have a idea?
> thank you very much!
> --
> All the Best!
> Li Tongjie
> _______________________________________________
> MediaWiki-l mailing list
> To unsubscribe, go to:
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l

More information about the MediaWiki-l mailing list