With OpenLDAP and the ppolicy overlay, one way to disable a user account is by setting the pwdAccountLockedTime. However, is it allowed to set this value to a future date so users account automatically expires?
From the tests I ran, this looks OK with OpenLDAP 2.6, but fails sometimes with OpenLDAP 2.4. I could not read anything in the password-policy reference, nor the ppolicy overlay documentation about this being either allowed or prevented.
Related links:
There are some clues in the OpenLDAP mailing list:
Since 2.5 OpenLDAP implements the pwdEndTime that can be used in that situation:
Related SO question: How to set account expiry date in openldap