Jump to content

Manual talk:ChangePassword.php

About this board

php maintenance/changePassword.php --user=XYZ --password=PW not working

3
Antoine2711 (talkcontribs)

I'm trying to change a password thru the command line, but even if I set this:

$wgPasswordPolicy['policies']['default']['MinimalPasswordLength']         = 6;

$wgPasswordPolicy['policies']['sysop']['MinimalPasswordLength']           = 6;

$wgPasswordPolicy['policies']['interface-admin']['MinimalPasswordLength'] = 6;

$wgPasswordPolicy['policies']['bureaucrat']['MinimalPasswordLength']      = 6;


I get an error with this:

php maintenance/changePassword.php --user=My_User --password=Ab$456

Passwords must be at least 6 characters.


And this works, but the password is not working to login.

php maintenance/changePassword.php --user=My_User --password=Ab$45678

Password set for My_User


Not working…


What should I do?!


Regards,

Antoine

Antoine2711 (talkcontribs)

Well…


This seams to work:

php maintenance/changePassword.php --user "User" --password "Ab$456"

Passwords must be at least 6 characters.


But it doesn't.


A.

Antoine2711 (talkcontribs)

K. My problem was the double quote that don't shield the special meaning of $.


This works:

php maintenance/changePassword.php --user "User" --password 'Ab$456'


Fixed.

Reply to "php maintenance/changePassword.php --user=XYZ --password=PW not working"

Make the PHP Script name relative to the Document Root

2
1000heads-luke (talkcontribs)

At no point on this page does it mention going into the /maintenance/ directory.

Might I suggest that either that be added as a step, or the code examples be changed to include that in the PHP filename, so it can be executed from the document root?

Kghbln (talkcontribs)

The location is stated in the info box at the top. However to make it clearer I added a note about the location from which the examples work. Thanks for your suggestion.

Reply to "Make the PHP Script name relative to the Document Root"
Huwmanbeing (talkcontribs)

Using ChangePassword.php produces this odd odd error:

PasswordError from line 62 of /var/www/eamon.wiki/public_html/mediawiki-1.30.0/maintenance/changePassword.php:
* The supplied credentials cannot be changed, as nothing would use them.
* The authentication data change was not handled. Maybe no provider was configured?
Backtrace:
#0 /var/www/eamon.wiki/public_html/mediawiki-1.30.0/maintenance/doMaintenance.php(92): ChangePassword->execute()
#1 /var/www/eamon.wiki/public_html/mediawiki-1.30.0/maintenance/changePassword.php(73): require_once(string)
#2 {main}

This occurred in 1.29.1, and is still occurring after an upgrade to 1.30.0. Does anyone know what might be happening? Huwmanbeing (talk) 13:44, 21 January 2018 (UTC)

Jgreendoe (talkcontribs)

We had this exact same error for select users and it was being caused by NewUserMessage extension. Disabling the extension resolved the problem.

Jgreendoe (talkcontribs)

Update: We re-enabled the extension and properly configured it to resolve the issue. The particular user who had the error was set as the editor on the MediaWiki:Newusermessage-editor page for this extension. Changing that to a different account solved the problem.

Reply to "PasswordError"
Harry0725 (talkcontribs)

In MW 1.27, since I use this command "ChangePassword.php" and try to reset password for one of my user. The password changed, but I start to get following error when any of user is trying to modify password or e-mail by Wiki system page:

[2563eeb90d75b862e14660c8] /index.php?title=%E7%89%B9%E6%AE%8A:ChangeCredentials/MediaWiki%5CAuth%5CPasswordAuthenticationRequest&returnto=%E7%89%B9%E6%AE%8A%3A%E5%81%8F%E5%A5%BD%E8%A8%AD%E5%AE%9A MWException from line 3795 of /var/lib/mediawiki/includes/user/User.php: CAS update failed on user_touched for user ID '55' (read from slave); the version of the user to be saved is older than the current version.
Backtrace:
#0 /var/lib/mediawiki/includes/session/SessionManager.php(306): User->saveSettings()
#1 /var/lib/mediawiki/includes/specials/SpecialChangeCredentials.php(219): MediaWiki\Session\SessionManager->invalidateSessionsForUser(User)
#2 /var/lib/mediawiki/includes/specials/SpecialChangeCredentials.php(107): SpecialChangeCredentials->success()
#3 /var/lib/mediawiki/includes/specialpage/SpecialPage.php(479): SpecialChangeCredentials->execute(string)
#4 /var/lib/mediawiki/includes/specialpage/SpecialPageFactory.php(576): SpecialPage->run(string)
#5 /var/lib/mediawiki/includes/MediaWiki.php(282): SpecialPageFactory::executePath(Title, RequestContext)
#6 /var/lib/mediawiki/includes/MediaWiki.php(745): MediaWiki->performRequest()
#7 /var/lib/mediawiki/includes/MediaWiki.php(519): MediaWiki->main()
#8 /var/lib/mediawiki/index.php(43): MediaWiki->run()
#9 {main}

I cannot fix this after lots of study, pls kindly help...Thanks

Reise Reise (talkcontribs)
Reply to "CAS update failed?"

I tried changing password from the preferences page, but password wont change

1
117.213.131.125 (talkcontribs)

No matter how many times I give the new password in the Special:ChangePassword page, my password wont change or take effect. My old password is still intact. Please help.

Reply to "I tried changing password from the preferences page, but password wont change"
There are no older topics