This is a security "feature" for WordPress.
If you can set a users password, you can then login as that user and have access to their profile, content etc.
There is a php function wp_set_password( $password, $user_id );
you can use to force someone's password if you want to write some code.
There are plugins to change passwords such as https://wordpress.org/plugins/bulk-password-reset/
Finally, if you have access to phpmyadmin, then go to the wp-users table (assuming your database has the wp- prefix) and for the user whose password you want to change you click edit (as in edit that users's record). Type in the new password in the user_pass
field, and in the functions column select MD5
which will encode the password and therefore WordPress will accept your change and re-encrypt the password without altering the actual password you set.
You must then update the user with the new password separately, or via plugin...
Note that Wordpress has a filter called show_password_fields
, so if you want yourself and all users on that site to be able to edit their own password (a reasonable request) then add the following code to your theme functions.php
function users_rule_show_password_fields() {
return true;
}
add_filter( 'show_password_fields', 'users_rule_show_password_fields' );
If you want only the admin to be able to do the changes use this code instead:
function users_rule_show_password_fields() {
if (current_user_can('edit_users') {
return true;
} else {
return false;
}
}
add_filter( 'show_password_fields', 'users_rule_show_password_fields' );