Discussion Locked

Reset Passwords for Multiple Users

0 helpful
7 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
How can I reset the passwords for multiple users, all at once? Rather than resetting each user's password individually. I just need to set a block of 200 users' passwords to a generic first time login password.

7 replies

by haileyan

Answer From:
http://expertanswercenter.techtarget.com/eac/knowledgebaseAnswer/0,295199,sid63_gci1053871,00.html

Is there an easy way to reset multiple passwords within a Windows 2000 domain? I have about 2000 accounts that I want to have all reset to a common password and then force the user to change the password on the next logon. QUESTION POSED ON: 22 AUG 2004
QUESTION ANSWERED BY: Paul Hinsberg You can script this pretty easy. Output a list of the names by exporting them from AD. Then you can use a simply FOR statement to reset the accounts. Let's say your text file is names.txt:

FOR /F %I in (names.txt) do NET USER %I [password] /DOMAIN

Replace [password] with the password you want to reset the accounts to. You will of course have to be logged in with domain admin privileges.

by r. a. caluste

create a text file containing the users and passwords like so:

user1, genericpassword
user2, genericpassword

save it as user.txt

use the for command in the command line like so:

for /F "delims=, tokens=1,2" %A in (users.txt) do net user %A %B /domain

Note: You must be the network administrator to change passwords for domain accounts.

Hope this helps.

by jkerns

I created the user text file & a VBS script with the info that you provided. But when I execute the script, I get an "Expected identifier" compilation error. The source of the error is listed as char 5, which is the /F. Am I missing something?

by jkerns

I corrected my mistake. I ran the command from a cmd line, as you specified, rather than from a script file. This worked! Thank you for your help.

This discussion is closed to new replies.