LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   Shell script for password expiry alert (http://www.linuxquestions.org/questions/linux-general-1/shell-script-for-password-expiry-alert-561413/)

bhandu 06-13-2007 04:32 AM

Shell script for password expiry alert
 
I want to write a shell script for following scenario

1. My login's password will expire in 10, so after 10 days I will have to change my password.
2. But I want to have a password expiry alert before 20 days of my password expiry telling me that my password will expire in 10 days. So I will have a buffer of 10 days and I will never go in the password expiry period as I will be changing the password 10 days before its actual expiration.
3. So I want to write a shell script for the above scenario.
4. Also let me know how to execute this script or where to place the script so that my login will get this alert 20 days before expiry of the password.

brianmcgee 06-13-2007 05:19 AM

This is already implemented in /etc/shadow you will find that setting at "warn":

Code:

username:passwd:last:may:must:warn:expire:disable:reserved


All times are GMT -5. The time now is 05:28 PM.