I think that its possible.
I made some days ago a script to check if crontab contains my script and add him if it don't contains. When you script is in crontab u can use what i told you to send email. I was searching on google how to change password and i found a script that i guess will help you.
There is the example:
"
for USER in $(cat /tmp/users.txt) do
$(useradd $USER)
###Remove the space between 8 and )
PASSWORD=$(openssl rand -base64 8 )
###passwd [double dash] stdin
echo $PASSWORD | $(passwd
–stdin $USER)
echo “$USER $PASSWORD” | mail -s “Your Account Info” $USER@company.com
sleep 3
done
"
You just don't need to read in the file like this script is doing, because u already know the user.
In the website that i found this script, the guy that made it explain a little more about it.
i haven't tested this script, because i am not in my home. Later i will try to do this in my home and come with a response if it do not work for you.
Another thing, about the password. I think you can use some variable like the month and make a calc with it to store on the computer. XOR is a good thing to make it, because you can have later you password encrypted, like a symmetric encrypt.
PS: the website that the script was found:
Tip: Add User and Generate Password Script | PinoyTux Weblog
PS2: If this is not exactly what you want, sorry. My english is not so good but i am trying to help with what i understand about the problem. If u need something diferent, try to explain again.
PS3: I am not a expert in shell script, i am just a curious and helping with what i already know. If somebody know a better solution, post a better way to make me learn too.
I hope help you,
Diogo