Discussion Locked

Change Password for Multiple Accounts?

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I have a requirement to set password for 3000 accounts. I have the 3000 accounts and their passwords on an excel spreadsheet. Is there a tool that will do this or do I have to do this manually?

2 replies

by timwalsh

Do ALL the user accounts already exist?

You can use the NET USER command from a command prompt.

To change passwords on more than one account, you can create a batch file. It will take a little time to create the batch file, but still not as much time as as it would take to manually do this (one at a time).

The basic process is as follows:
1. (If needed,) change your spreadsheet so there are only 2 columns: userID and new password (in that order).
2. Save your spreadsheet as a tabdelimited text file.
3. Open the saved file in a text editor such as Notepad.
4. Get rid of any extraneous information that could cause problems (such as column headers).
5. On each line, in front of the user ID, paste the command NET USER. Each line would then look as follows:

NET USER userid password

6. Once you have finished editing, add the command @echo off as the first line of your batch file.
6. Resave the file and change the extension from .txt to .bat.
7. Run the batch file from the command prompt.

If you want to run the batch file from any computer other than a domain controller, you must add a /DOMAIN switch at the end of each line. This would look as follows:

NET USER userID password /DOMAIN

Given the magnitude of the changes you need to make, you might want to break the list into chunks and create multiple batch files. As a further suggestion, for your first batch, you might want to just use a small sampling of accounts to ensure the batch is executed correctly. Otherwise, since each line will be essentially identical you will get error message as each line is executed.
(continued)

by timwalsh

If you do use multiple batches, it is important that you use the "@echo off" command as the first line of each batch. Otherwise, each line will be echoed to the screen as it is executed (and anyone watching will be able to view each userID with itsassociated password - obviously a serious security risk).

Another note: as each line completes execution, you will receive a verification in the form of "The command completed successfully."

Good luck.

This discussion is closed to new replies.