hi,
i understand your problem ,
firstly isn't there an option in BAAN to check for password expiry , either on a later release ?
How often do you want the password to expire ?
Is there another option to change the password and will they see it on their front end interface,
Have you looked at setting the option
Days to WARN USER before password expires for each user
and does this warn them ?
your method looks good to me , get the week number by date +%U , and then when the time comes near use write command
for the user i.e. write fred < pwdexpire.txt
in pwdexpire.txt would have message your password will expire in a week or so?