Manual:changePassword.php
Appearance
| MediaWiki バージョン: | ≧ 1.6 |
| MediaWiki ファイル: changePassword.php | |
|---|---|
| 場所: | maintenance/ |
| ソース コード: | master • 1.44.2 • 1.43.5 • 1.39.15 |
| クラス: | ChangePassword |
詳細
changePassword.php は、ウィキの利用者のパスワードを変更するメンテナンス スクリプトです。 注意点はパスワードは最短でも10文字以上という決まりです。
オプション/引数
| オプション | 説明 | 必須かどうか |
|---|---|---|
| --user | 操作対象の利用者名 | 省略可能 |
| --userid | 操作対象の利用者 ID | 省略可能 |
| --password | 使用するパスワード | 必須 |
使用法
php maintenance/run.php changePassword [--user| --userid| --password ]
MediaWiki バージョン 1.39.15 以前では、メンテナンス スクリプトを
php maintenance/run.php スクリプト名 ではなく php maintenance/スクリプト名.php を使用して実行する必要があります。Terminal
$ php maintenance/run.php changePassword --user Foo --password IamPassword Password set for Foo
利用者名とパスワードにはスペースを含めることができるので、シェル (bash または cmd.exe; 以下の Troubleshooting を参照) から保護する必要があります。
Terminal
$ php maintenance/run.php changePassword --user "Foo Bar" --password "fierce sea ceasefire" Password set for Foo Bar
トラブルシューティング
- If your MediaWiki installation uses a memory cache, such as APC, memcached or Redis, then the user object is cached. Thus after making SQL changes you must flush the cache before a user can log in with the new password.
- Windows has special challenges with parsing double-quoted strings, as when a username or password contains spaces in the second example above.
- Occasionally triple (
"""quoted string""") and quadruple sets of double quotes will solve your problems with Windows' command shell,cmd.exe. You may be happier, though, to try Cygwin and follow the Unix conventions for quoting strings, which require fewer quotation marks.
- Occasionally triple (