How the admin can change someone's password.
The built-in "forgot password" feature will work for most people to change their own password. But this is useful for locking out users.
Changing a password ∞
A database administrator can change anyone's password. This was tested and works in PhpMyAdmin:
-
Go to the "SQL" tab.
UPDATE USER SET user_password = MD5(CONCAT(user_id, '-', MD5('password'))) WHERE user_name = 'Username';
- user is the name of the table which has your user info. It is
$wgDBprefix
anduser
. - password is the new password.
-
Username is the name of the user whose password you are changing. This is case-sensitive. If you need to, browse the user table and double-check the exact username. Remember that MediaWiki capitalizes names!
After pressing "go", make sure that you get the message "Affected rows: 1
"
Strange, this doesn't seem to work with MediaWiki 1.6.10
try using this instead (wikiuser
, not just user
):
UPDATE wikiuser SET user_password = MD5(CONCAT(user_id, '-', MD5('password'))) WHERE user_name = 'Username';
Changing many password simultaneously ∞
Steps:
1. Browse that user table
2. Select multiple records by clicking the checkbox to the left of their name
3. At the bottom of the list you'll see a footer with 'check all / uncheck all With selected:' and some icons. Click the odd-looking icon to the right of the red x.
Now you'll see "SQL query" with some text like this:
SELECT * FROM `dev_user` WHERE ( `user_id` =26 ) OR ( `user_id` =27 )
4. At the bottom of that query is a footer, click 'edit'. It'll have text like this.
SELECT * FROM `dev_user` WHERE ( `user_id` = 26 ) OR ( `user_id` = 27 )
5. Change the beginning of it like this:
SELECT * FROM `dev_user` WHERE
change to:
UPDATE USER SET user_password = MD5(CONCAT(user_id, '-', MD5('password'))) WHERE
6. click 'go'
Locking someone out ∞
- Scramble their password in MySQL with the instructions on this page.
-
Block their username within MediaWiki.
Last updated 2019-11-19 at 07:27:00
ported