Ldap – How to disable password change for openldap user

ldapopenldap

Considering possible solutions for some improvements I run into this theoretical question and I couldn't find a satisfying answer. Some of you may have first-hand experience with this in practice, so here the question goes:

How can I disable password changing for an OpenLDAP user?

The account must stay enabled, allowed to log on to workstations and work as usual, but should not be able to change its own password.
Can this be done?
If so, how difficult is it to implement it?

All suggestions are appreciated!

For reference: Servers and workstations are to run a mixture of FreeBSD and OpenBSD. Accounts to get password disabled are student or generic workstation accounts. Environment is a school.

Best Answer

It's not very clear what you want to do, but you can try to use OpenLDAP ACLs to create the restrictions you need.

Usually, the ability to modify a password is restricted to self and administrators, but you can limit this further for certain OUs.