> cool solutions home   > cool tools home
Password Expiration Email Notification
Java console application that sends users email notifications of upcoming password expiration.
Reader Rating    from ratings rate this article
View a Printer Friendly Version of this Page Send this page to a friend
Updated: 19 May 2005
File Size: 766KB
License: Free
Download 1:  password_expiration_notification.zip
Publisher: Paul Sherman
E-mail: psherman@TAKETHISOUTnovell.com
Please read the note from our friends in legal before using this file.

The zip file contains the Java source, supporting files, and documentation for the Password Expiration Notification solution currently used by Novell IS&T.

This Java console application checks users in an LDAP directory and sends notification email messages when their password is about to expire. The application is scheduled to run nightly. Only those users whose passwords will be expiring in a specified number of days will be notified.

A configuration XML document defines the LDAP connection information, day intervals for notification and the email message templates for each interval. For example, users who will be expiring in 30 days may receive a different email message than those expiring tomorrow. The email messages are designed to be readable in both HTML and text-only views.


Expiration Notification has the following dependencies:

config.xml configuration document
OS task scheduler     the application must be scheduled to run every 24 hours
service account LDAP user with read access to password related attributes
Classpath Include mail.jar, activation.jar and jsse.jar in the Java classpath


No passwords are hard-coded in this application. The LDAP connection password is retrieved from the configuration document. It is assumed that the configuration document is protected from unauthorised access by the file system. A service account with read access to password related attributes is required.

5-18-05 Update

There was a bug in the code and an error in the sample config.xml :( Sorry about that.

This update should take care of many of the reported problems. I also added the ability to run the application in console mode (no GUI) for those who are having trouble with X-Windows on Linux. I updated the instruction document to reflect these changes.

5-19-05 Update

I added a shell script to help Linux users run the app correctly.