Notification of password expiry.

Hi,

Is there any way of sending an email to a number of users indicating that the passwords of user accounts will expire?  

Currently we have a test server with a number of oracle test accounts on it. Each of these accounts correspond to an instance of Oracle on the server. These accounts would have cron entries for running scripts etc. When the password expires the cron entries do not run anymore.

The DBAs never log into the test server with these Oracle accounts, they log in using their own account and then sudo su - to the chosen oracle account. Logging in this way means they won't be notified that the password has expired. I need to be able to notify the DBAs of impending password expiration on these accounts by sending an email to them so they can change them. Is there any way to do that? Thank you.

You can use:

$ logins -xl <username>

as the basis of a password expiry warning script, I wrote one using a perl script to convert the epoch time to a date. The script at http://cpan.mirrors.uk2.net/authors/id/J/JM/JMATES/epoch2date-1.5 as a template to do the epoch to date conversion for you.

Thanks TonyFullerMalv. I'll try that.