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.

I need to be able to notify the DBAs of impending password expiration on these accounts by sending an automated email to them so they can change them. Is there any way to do that? Thank you.

It can be done but it's not something that's part of Solaris.

Basically you'd have to check /etc/shadow for the password change date and the number of days for password changes. Get today's date, subtract seven days from it (for example), add the password change number of days to the password change date. If that number is greater than today - 7 days, send them an e-mail.

We added the users e-mail address to the GECOS field (:name,e-mail:) and we just send them a message each day. If it's expired, we send them a "your account has expired, your scripts aren't running, please contact the help desk" message.

Carl

Thanks Carl. I will try that.