Date conversion script

From: Kathy Ange (kathyange@yahoo.com)
Date: Thu Aug 04 2005 - 09:54:52 EDT


I feel like this is probably an easy question, so I have been searching
the internet for an answer, but just cant figure this out myself.

My question simply stated is, I want to be able to e-mail a person
outside of the unix server, when a unix id is about to expire. Also if
the password will expire within 3 days I want to e-mail the system
administrator. Yes if the user is logged on the person will see the
warning message, but some IDs aren't logged on daily

In the /etc/shadow file the 3rd field is the number of days (since
January 1, 1970) since the password was last changed. I am looking for
a way to take today date and display as the number of days since
January 1, 1970 and then compare to two numbers. If the numbers are
within the password warning time frame then send the appropriate e-mail

Another thought was to use the date from passwd s where the date is
displayed as mm/dd/yy, convert to a Julian date do the calculations
then convert back to gregorian
corn: root: #passwd -s rnott
rnott PS 07/27/05 7 63 7

I am on Sun Solaris 9,
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 23:31:14 EDT