Reset user password in MediaWiki


One of MediaWiki user lost his password, we need to restore access to user’s account.

Reset using maintenance script (recommended): log into server, cd into maintenance directory and run

sudo php changePassword.php --user=username --password=NEWPASS


Reset using database: log in your database using privileged user and run

UPDATE prefix_user SET user_password = MD5( CONCAT( user_id, '-', MD5( 'NEWPASS' ) ) ) WHERE user_id = 1


Ensure your prefix_, user_id and are correct NEWPASS according your situation.