Possibility to block password changes only for users from AD

I have mixed users, local and synced from AD. It is possible to lock password changes only for users synced from AD but in the same time allow this operation for local users?