|MediaWiki File: changePassword.php|
changePassword.php can be used to change the password of a user on your wiki.
php changePassword.php --user=target_username --password=new_password
php changePassword.php --user=JohnSmith --password=Secret12
Usernames and passwords can have spaces, which will need to be protected from your shell (be it bash or cmd.exe; see Troubleshooting, below):
php changePassword.php --user="Anna Graham" --password="fierce sea ceasefire"
To display a help message:
php changePassword.php --help
--user (the user's name)
--password (the user's new password)
--help (displays help message)
- This script may not work if you are using memcached on your MediaWiki installation. You can restart memcached to make it clear its cache and allow you to login again.
- Windows has special challenges with parsing double-quoted strings, as when a username or password contains spaces in the second example above. You may find some illumination on this issue here (autohotkey.net)—or it might just make your brain hurt.