Topic on Project:Support desk

Possible to have different hashes in database?

2
195.80.111.109 (talkcontribs)

Hey!

I am wondering if is it possible to have different password hashes in MySQL database?

E.g.

Admin - SHA-256:Salt:Password User1 - MD5:Salt:Password

Have tried this:

UPDATE `user` SET user_password = CONCAT(':A:', MD5('somepass')) WHERE user_name = 'someuser';

And it changes the password correspondingly, but after one log in with the user it changes the hash back to SHA-256 (Guess some kind of MediaWiki default.

Any ideas?

88.130.103.73 (talkcontribs)

Hi!

MediaWiki supports different password hashing algorithms. Even if one of these algorithms is set to be the default (SHA-256 in your case), for backwards compatibility it may still be possible to log in with hashes of another format. These older hashes are then updated during login. See Manual:User_table#user_password for more details!

Reply to "Possible to have different hashes in database?"