How to make an automated password change for a windows user? Windows 2003 Server

Here is the situation.We are running terminal services and it has now come neccesary for us to allow the user to actually log onto the local machine. We now have made it so that when the machine turns on, it boots into the terminal session, nerver allowing the user to see the local machine. Now with us needing a "generic" local user, we need a way to make this user with a password that changes automatically & random.

It is a school enviroment and only students with permission, by the teacher, to get on the local machine will need to know the password. Idealy i would like for there to be a generic user, thats password changes automatically, and is emailed to the teacher upon its change. I did not know if someone else has done this before. Is there a way to make automated password changes? Is there the ability to set a password change time increments?

Thanks for the help ahead of time.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Schedule a script to run via windows scheduler.  Something like this could be modified to your liking:

'Rand - Return a random number in a given range.
'Create "random" password
Randomize 'init random number seed
High = 9999 ' high number value
Low = 2 'low number value
Rand = Int((High - Low + 1) * Rnd) + Low
strpassword = "Secret" & Rand

'Change password

strUser = fullusername 'Enter full name of username
strOU = userou 'Enter OU where user's account resides here
Set objUser = GetObject("LDAP://CN=" & strUser & ",OU=" & strOU & ",DC=testdomain,DC=local")
objUser.SetPassword strpassword


Set objEmail = CreateObject("CDO.Message")
objEmail.From = ""
objEmail.To = ""
objEmail.Subject = "PASSWORD CHANGED"
objEmail.Textbody = "The password for jsmith has been changed to " & strpassword  
objEmail.Configuration.Fields.Item _
 ("") = 2
objEmail.Configuration.Fields.Item _
 ("") = _
objEmail.Configuration.Fields.Item _
 ("") = 25

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows Server 2003

From novice to tech pro — start learning today.