Sending a message to a user when password will be expired

Hi,

Does anyone have a script (for AIX) that sends a message to a user that his password will be expired within 5 days for ex.

Thanks

Although I don't have a way to test (we don't use that accounting feature), you could try the logins command (you have to be root). Try the -a or -x options and cut out the date field (according to the man page it should contain a date). Once you have the date it will expire, you can write a script to take that date minus today's date and if the account is 5 plus or minus to the expiration, email them with mailx.