Content added Content deleted
imported>mutante mNo edit summary |
Hoof Hearted (talk | contribs) m (Hoof Hearted moved page Mediawiki/Change User Password to MediaWiki/Change User Password: Correct name) |
||
(8 intermediate revisions by 5 users not shown) | |||
Line 3: | Line 3: | ||
Assuming that <var>$wgPasswordSalt</var> is set to true (the default), you can use the following SQL query: |
Assuming that <var>$wgPasswordSalt</var> is set to true (the default), you can use the following SQL query: |
||
UPDATE user SET user_password = MD5(CONCAT(user_id, '-', |
UPDATE user SET user_password = MD5(CONCAT(user_id, '-', MD5('somepass'))) WHERE user_name = 'whatever'; |
||
MD5('somepass'))) WHERE user_name = 'whatever'; |
|||
Where obviously "somepass" is changed the password you want to set and "whatever" is changed to the user name as it is listed in the table "user". |
Where obviously "somepass" is changed the password you want to set and "whatever" is changed to the user name as it is listed in the table "user". |
||
Line 11: | Line 11: | ||
[[Category:Wiki]] |
[[Category:Wiki]] |
||
[[Category:Internal]] |
[[Category:Internal]] |
||
[[Category:Mediawiki]] |
Latest revision as of 14:17, 29 August 2022
How do I change a user's password?[edit]
Assuming that $wgPasswordSalt is set to true (the default), you can use the following SQL query:
UPDATE user SET user_password = MD5(CONCAT(user_id, '-', MD5('somepass'))) WHERE user_name = 'whatever';
Where obviously "somepass" is changed the password you want to set and "whatever" is changed to the user name as it is listed in the table "user".
from [1]