notification mail when password expired

Hallo, can anybody help me with my issue? I�d like to know if it is possible to send me a mail (to @mail.com for example) when some account password will expired? eg. few days ago of this expiration. We don�t use this account every day, it is used for DB2 and DB2 has problem every 90�s day because his password expired.

Thank You.

cat the file : "/etc/security/user" and look at its usage, especially "pwdwarntime"

issue the command "pwdadm -q <username>" as root to get an output similar to the following:

# pwdadm -q nobody
nobody: 
        lastupdate = 1192452222

The lastupdate value shows the time the password was last changed and is in "seconds passed since Jan 1st 1970"-forma. It is extracted from the file /etc/security/passwd. You can:

either set the value there directly (add 86400 every day or something such);

change the maxage attribute of the user account to "-1" to never let the password expire;

Both these methods are only available if you have root access to the system. If you only have user rights you have no possibility to find out how old your password already is. Do the following:

create an alias for the "passwd" command (put that into your ~/.kshrc) , which does the following: first call a script and have it write a date information to a file, then call the normal /usr/bin/passwd. This way you can maintain your own age information about the last password change. The information could be used to issue a mail (via a cron job) whenever the expiration date is near.

I hope this helps.

bakunin