Disable password change for users


Hello, everybody,

is there a way that normal users can’t change the password, only the admin can?

I didn’t find anything up to date in the administration manual or via Google.

I am looking forward to your feedback.

Thank you


Are those users, local users or LDAP users?


I’m talking about about local users.


official statement: please use LDAP for user management.


This works for all users.
Just commented out the line and users can no longer change the password.
Commenting out other variables you can remove the change of avatar, mail, etc.

#$tmpl->assign(‘passwordChangeSupported’, OC_User::canUserChangePassword(OC_User::getUser()));

All variables can be viewed in personal.php here on GITHUB.

But the reset form on the main page still works.