This script will browse LDAP directory, find aliases, search target entry and delete alias if the target entry was removed.
This shell script must be run as a cronjob. You can run it daily.
It requires:
Tested on GNU/Linux.
Command line parameters:
-b <basedn>: search baseRun:
sh cleanLdapBrokenAliases.sh -b "ou=structures,dc=example,dc=com"
Edit the script to adapt configuration:
MY_LDAP_URI: LDAP URIMY_LDAP_BINDDN: DN to use to bindMY_LDAP_BINDPW: PasswordMY_LOG_HEADER: Log headerThe PATH must be set to include all shell commands used by the script.