MediaWiki/Password: Difference between revisions
Jump to navigation
Jump to search
(Created page with "== Manually Reset Password == To reset password (will set to 'local'): <ref>https://techblog.kjodle.net/2018/05/28/change-a-mediawiki-password-via-phpmyadmin/</ref> UPDATE user SET user_password=md5(concat(1,'-',md5('local'))) where user_id=1;") |
No edit summary |
||
Line 1: | Line 1: | ||
== Manually Reset Password == | == Manually Reset Password == | ||
To reset password (will set to 'local'): <ref>https://techblog.kjodle.net/2018/05/28/change-a-mediawiki-password-via-phpmyadmin/</ref> | To reset password (will set to 'local'): <ref>https://techblog.kjodle.net/2018/05/28/change-a-mediawiki-password-via-phpmyadmin/</ref> <ref>https://www.mediawiki.org/wiki/Manual:Resetting_passwords</ref> | ||
UPDATE user SET user_password=md5(concat(1,'-',md5('local'))) where user_id=1; | UPDATE user SET user_password=md5(concat(1,'-',md5('local'))) where user_id=1; | ||
UPDATE `user` SET user_password = CONCAT(':B:1234:', MD5(CONCAT('1234-', MD5('somepass')))) WHERE user_name = 'someuser'; | |||
Note: MySQL salted (1234 is the salt. You can replace it with any number as long as both places the number is used are the same). Manually set the "B" format. This format is very easy to set from an SQL query. It is not the default format as it is weaker than pbkdf2, however that's ok as the user_password field will be upgraded to the correct format the next time the user logs in. |
Latest revision as of 06:52, 31 December 2023
Manually Reset Password
To reset password (will set to 'local'): [1] [2]
UPDATE user SET user_password=md5(concat(1,'-',md5('local'))) where user_id=1;
UPDATE `user` SET user_password = CONCAT(':B:1234:', MD5(CONCAT('1234-', MD5('somepass')))) WHERE user_name = 'someuser';
Note: MySQL salted (1234 is the salt. You can replace it with any number as long as both places the number is used are the same). Manually set the "B" format. This format is very easy to set from an SQL query. It is not the default format as it is weaker than pbkdf2, however that's ok as the user_password field will be upgraded to the correct format the next time the user logs in.