Automating a password change to a user account daily

Posted on 2006-04-03
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.
Question by:csjackson
    LVL 13

    Accepted Solution

    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:

    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!


    Author Comment

    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!

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    Have you ever set up your wireless router at home or in the office to find that you little pop-up bubble in the bottom right-hand corner of Windows read "IP Conflict - One of more computers on the network have been assigned the following IP address"…
    A common practice in small networks is making file sharing easy which works extremely well when intra-network security is not an issue. In essence, everyone, that is "Everyone", is given access to all of the shared files - often the entire C: drive …
    Need more eyes on your posted question? Go ahead and follow the quick steps in this video to learn how to Request Attention to your question. *Log into your Experts Exchange account *Find the question you want to Request Attention for *Go to the e…
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now