?
Solved

How to use a VBS script to mass change user passwords

Posted on 2006-10-26
7
Medium Priority
?
237 Views
Last Modified: 2010-04-18
I have just migrated from NT4 to windows 2003. I have moved over 400 users into an OU called users and want to mass change all their passwords to Password1. I have looked at a few VBS scripts but am having trouble with them. Any help would be appreciated?

Thanks!

Michael
0
Comment
Question by:Luxtech
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
7 Comments
 
LVL 71

Expert Comment

by:Chris Dent
ID: 17811941

Here we go... nice and little. You'll need to fill in the password and the path for the OU. This is based on the domain name being yourdomain.local so alter as applicable.


Set objOU = GetObject("LDAP://OU=SomeOU,OU=SomeWhere,DC=YourDomain,DC=local")
objOU.Filter = Array("user")

For Each objUser in objOU
      objUser.SetPassword "NewPassword1"
Next


And that's all there is to it unless they're in sub-OUs and such.

HTH

Chris
0
 
LVL 1

Author Comment

by:Luxtech
ID: 17817803
Hi Chris

I am still having problems with this, I am getting an error on the script that sys:

line: 1
char: 1
Error: A referral was returned from the server.
code: 8007202b
source: (null)

I have changed the obj names to the users ou.

Thanks
0
 
LVL 71

Expert Comment

by:Chris Dent
ID: 17817985

Oh they're in the default Users OU? That one isn't really an OU (for whatever reason MS decided) it should be:

Set objOU = GetObject("CN=Users,DC=YourDomain,DC=local")

After that it can be treated in exactly the same way as above.

Chris
0
Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

 
LVL 1

Author Comment

by:Luxtech
ID: 17818015
Hi Chris

Thanks for your help but I used AD infinitum to mass change everyones password which worked fine.

I appreciate your time looking into this for me!

Take care

Michael
0
 
LVL 71

Expert Comment

by:Chris Dent
ID: 17818018

No problem.

Chris
0
 
LVL 1

Accepted Solution

by:
Computer101 earned 0 total points
ID: 18016089
PAQed with points refunded (250)

Computer101
EE Admin
0

Featured Post

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

Organizations create, modify, and maintain huge amounts of data to help their businesses earn money and generally function.  Typically every network user within an organization has a bit of disk space to store in process items and personal files.   …
While rebooting windows server 2003 server , it's showing "active directory rebuilding indices please wait" at startup. It took a little while for this process to complete and once we logged on not all the services were started so another reboot is …
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

800 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