Manual:Resetting passwords

Via e-mail
If you're able to easily find the e-mail address used with the account and update it, you can have MediaWiki send a 'forgot password' e-mail, which allows the software to change the password for you.

Maintenance script
Execute this script to change the password for username to foo php changePassword.php --user="username" --password="foo"

MediaWiki extension
An extension is available to reset passwords: Extension:Password Reset.

Direct database modification
To reset a password you can change the value of user_password field, in user's table. However, it's generally far easier and safer to change the e-mail address of the selected user and have MediaWiki reset the password using the "Forgot your password" feature (see above).

1.13 and above
You should choose the salted or unsalted method depending on the value of $wgPasswordSalt in LocalSettings.php

MySQL unsalted:

MySQL salted (make sure both instances of "somesalt" are the same):

PostgreSQL unsalted:

PostgreSQL salted (make sure both instances of "somesalt" are the same):

1.12 and below
MySQL:

PostgreSQL: