项目作者: meroupatate

项目描述 :
Mail notifier for LDAP password expiration
高级语言: Python
项目地址: git://github.com/meroupatate/ldap-password-expiration-notifier.git


LDAP password expiration notifier

Mail notifier for LDAP password expiration.

About

The script is designed to be run once a day and sends an email notification to LDAP users whose password is expiring soon.

Prerequisites

  • a LDAP server with configured password expiration policy
  • a working local mail relay server (e.g. postfix)
  • python3 (version > 3.6)
  • python3-pip

Installing

First clone the repository:

  1. git clone https://github.com/meroupatate/ldap-password-expiration-notifier.git

Install the python dependencies:

  1. cd ldap-password-expiration-notifier
  2. pip3 install -r requirements.txt

Edit config.py to connect to your LDAP server:

  1. mv config.py.example config.py
  2. vim config.py

Test if the script is running correctly:

  1. python3 notifier.py

Finally, set a cron job to launch the script daily:

  1. echo '0 0 * * * root /usr/bin/python3 /path/to/notifier.py' >> /etc/cron.d/ldap-password-expiration-notifier