We help IT Professionals succeed at work.

Automating a password change to a user account daily

csjackson
csjackson asked
on
Medium Priority
332 Views
Last Modified: 2013-12-23
Synopsis:  I am hosting a webserver at my company which allows our clients to gain access to a downloads and helpdesk ticketing section.  Once the client authenticates via a username and password they are allowed to gain access to the restricted members site.  My company has a sales demo server which hosts our product and allows a client/potential client to demo new features through a Citrix Web environment.  The user account and password of the day to gain access to the demo box would be posted in a section that only clients can see. We have an account on the the box that is to be used by all clients; however the password needs to be changed daily.  I have an Excel spreadsheet that contains 400 random passwords that I gave to our webmaster.  He knows how to have the password pull from the spreadsheet each day, but my question is how can I synchronise the password to mach whatever the new password being posted is and have the NT password change fully automated?  Thank you very much for your help.  Please let me know if I need to be clearer.
Comment
Watch Question

Ok, this isn't necessarily the cleanest way to do it, but here's a thought.

First off, see this site for a command line way to change your password:

http://www.petri.co.il/change_user_password_from_the_command_prompt.htm

What you could do is create a batch script (or if you know VBscript, that might be better) to automate changing the password.  You could export your Excel file to a text file with your 400 entries.  Then just have a daily scheduled task to run your new batch file, which would set the password by grabbing the next entry in your password list.  I'd have to sit down for a while to figure out the cleanest way to do this...  But I don't see why it wouldn't work.

What you could do is find a utility that could take the 1st password in the list, remove the line, then append the line to the file (moving it to the end of the password list).  When I say "take" the password, it actually sets it as a variable.  Then you use that command line password change with this variable to set the password.  If you wanted, you could then create a file with just this one password, which could then be read by your website to display to users.

There's probably a lot cleaner way to do this, but I think if you worked through this, step by step, you could do it pretty easily.  Just make sure your scheduled task runs as a user that is capable of changing this remote user account's password!

Jeff

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts

Author

Commented:
That is what I came up with, however the problem that I am having is the syntax to get the script to pull the password from a specific date.  The other issue is that the net user command asks you to verify the password 2x.  I think if I can answer those questions I will be good.  Thanks!
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.