Link to home
Start Free TrialLog in
Avatar of Nermal
Nermal

asked on

Resetting 1300 Passwords

Hi,

I am trying to reset 1300 passwords on a Windows 2000 server.
Is there an easy way to do this, I have the Res Kit, but cannot find a tool.
I have a csv with 2 columns (Userid, password)

Thanks
Andrew
ASKER CERTIFIED SOLUTION
Avatar of oBdA
oBdA

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
You can also do this with 'cryptpwd'


For example to change all the Local Administrator's Passwords Remotely
 

Download the utility 'cryptpwd' from :
http://www.jsiinc.com/tip0300/rh0349.htm

Now just create a textfile containing all your servernames
(e.g. serverlist.txt) and then create a batchfile with the following line :

FOR /F %%x in (serverlist.txt) do cryptpwd -m \\%%x -P newpassword

(where newpassword is the password you want to set as the
local administrator password on the servers.)

(You obviously need to have admin. rights to the servers in order
to change the password.)

This method changes the password immediately.


From http://infocenter.cramsession.com/TechLibrary/GetHtml.asp?ID=1373&CatID=267
This is taylored for admin passwords, if thats NOT what you need go for oBdA's solution (which is better than mine:0)

PeteL
Avatar of bonzai
bonzai

Hi

what delimiters has your CSV? can you post some "example-lines"?

bonzai
Hi

This little VB-Script should do the task! In this example, the Ressourcefile is C:\TEMP\USERS.CSV. this file looks like:

user1,password1
user2,password2
user3,password3
user4,password4

limitations: All the Users must be in the same OU! (in this example, the users are in the OU "users" on the Domain test.com

be careful trying this script ;-), test it on your TestDomain first!!!!!!!! (what? no Testdomain??? ;-)

cheers


'----------------------------------------------------------------------
dim mStream,FS,fLine,user,password,delimiter

delimiter = ","
ressourcefile = "C:\TEMP\USERS.CSV"

Set FS = CreateObject("Scripting.FileSystemObject")
Set mStream = FS.openTextFile(ressourcefile,1)

do while mStream.AtEndOfStream = false
      'reading a line of your ressourcefile
      fLine = mstream.ReadLine
      
      'separating user from the Password      
      username = left(fLine,instr(fline,delimiter)-1)
      password = right(fline,instr(fline,delimiter)-1)
      
      'defining the new password on the domain
      Set usr = GetObject("LDAP://CN="& username & ",OU=users, OU=com,DC=test")
      usr.SetPassword password
loop
'----------------------------------------------------------------------
I just downloaded the cusrmgr.exe utility and I'm running the following command:

cusrmgr -u testuser -p

Now where on earth is the random password saved for this user?

Thanks

Ahem--as the user's password? You can use that, for example, to change the local administrator password of domain members on a regular basis without having to make up your own passwords. If you try that with the domain admin accounts, though, you're in trouble ...
cryptpwd = cusrmgr PeteLong... same author, diff rev, new name...