I can't do it at login because users lock (for a long time) their workstations instead of logging off. I know how to get a list of users for the domain, but how do I use that list to check for password age and send e-mail??
user.txt:
usera userb userc
userd usere etc...


code:
 
$maxpwage=10
open users.txt
realine(1)
while $rc=0
extract usera from line1
If usera password > $maxpwage
send e-mail to usera
endif
readline(1)
loop