If you're using a current version of MediaWiki (at the time of this posting 1.32, but this goes back to 1.18) most of the hooks in the accepted answer by Carsten Schmitz are now deprecated or have even been removed, so I'll post a similar solution with currently available hooks (that work with AuthManager).
As usual, add the following lines to LocalSettings.php:
This will remove the links for password reset and help for logging in on the login page. If you want to add another link instead, just replace false with a valid HTML link such as <a href="https://urltopasswordchangesite">I forgot my password</a>:
$wgHooks['AuthChangeFormFields'][] = function ( $requests, $fieldInfo, &$formDescriptor, $action ) {
if ($action === "login") {
// Removes the "Help for logging in" link
$formDescriptor["linkcontainer"]["default"] = false;
// Removes the actual password reset link
$formDescriptor["passwordReset"]["default"] = false;
}
return true;
};
This hook will remove the button for password reset in the user preferences panel:
$wgHooks['GetPreferences'][] = function ( $user, &$preferences ) {
unset( $preferences['password'] );
return true;
};
Finally, the easiest way to disable a password and credentials change is to disable the corresponding special pages:
$wgHooks['SpecialPage_initList'][] = function ( &$list ) {
unset( $list['ChangeCredentials'] );
unset( $list['PasswordReset'] );
return true;
};