[Last Call] Learn how to a build a cloud-first strategyRegister Now


Automating a password change to a user account daily

Posted on 2006-04-03
Medium Priority
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

masterbaker earned 1000 total points
ID: 16364759
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

ID: 16394182
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!

Featured Post

Transaction-level recovery for Oracle database

Veeam Explore for Oracle delivers low RTOs and RPOs with agentless transaction log backup and transaction-level recovery of Oracle databases. You can restore the database to a precise point in time, even to a specific transaction.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Nslookup is a command line driven utility supplied as part of most Windows operating systems that can reveal information related to domain names and the Internet Protocol (IP) addresses associated with them. In simple terms, it is a tool that can …
Sometimes you might need to configure routing based not only on destination IP address, but also on a combination of destination IP address (or hostname) and destination port number. I will describe a method how to accomplish this with free tools. …
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses

829 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