MediaWiki version:
1.24
MediaWiki file: wrapOldPasswords.php
Location: maintenance/
Source code: master 1.40.0 1.39.4 1.35.11
Classes: WrapOldPasswords

Details

wrapOldPasswords.php file is a maintenance script to wrap all passwords of a certain type in a specified layered type that wraps around the old type.

If necessary, the old MD5 hashing can be restored by changing $wgPasswordDefault to 'B'.

This maintenance script can wrap all passwords in 'pbkdf2-legacyA' or 'pbkdf2-legacyB' if you do not want to wait for your users to log in.

Options/Arguments

Option Description Required?
--type Type to convert to. This must be one of the layered types from $wgPasswordConfig , meaning either pbkdf2-legacyA or pbkdf2-legacyB.Required
--verbose Create verbose output during execution.Optional
--update Actually wrap passwordsOptional

Usage

php maintenance/wrapOldPasswords.php --type PasswordConfigKey [ --verbose| --update ]

Dry run

Terminal
$ php maintenance/wrapOldPasswords.php --type pbkdf2-legacyA

7 user rows found using old password formats. Run script again with --update to update these rows

Updating the password

Terminal
$ php maintenance/wrapOldPasswords.php --type pbkdf2-legacyA --update

7 users rows updated.

See also

  • Manual:$wgPasswordConfig
  • Manual:$wgPasswordDefault
  • Manual:ChangePassword.php
  • Manual:deleteLocalPasswords.php
This article is issued from Mediawiki. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.