ltb-project / ldap-scripts

This is a collection of scripts for LDAP directories
http://ltb-project.org/wiki/documentation#scripts
GNU General Public License v3.0
32 stars 20 forks source link

Display remaining time before expiration in check password expiration script #11

Closed coudot closed 4 years ago

coudot commented 4 years ago

When the mail is sent to the user when its password is about to expire, the user don't know when the expiration will occur (or how time he has left). We should add this information in the email.

For example:

Hello John Doe,

you password will expire on 25/12/2019, you have 2 days left to change your password.
coudot commented 4 years ago

This new information (expiration date and remaining time) must be set in variables so we can set them in MY_MAIL_BODY parameter.

coudot commented 4 years ago

Code updated by @pcurie, thanks!

Documentation updated too: https://ltb-project.org/documentation/ldap-scripts/checkldappwdexpiration