Mass Domain Password Reset

Bransby-IT used Ask the Experts™
Small Busiess 2003 R2

I want to rest all domain users accounts at a set time en mass.

I can reset one by one by this is not what I want to be doing.

Reset all passwords to a set password then get them to change at next login.
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
You could use a script such as the one on this page and loop through the users.
*** Hopeleonie ***IT Manager
To set all users to the same password issue the following command at a computer with the admin tools installed.

dsquery user -samid * | dsmod user -pwd {password}

Be VERY careful with this as it will reset all of your user passwords. ALL of them.

I would suggest targeting this command to a single ou by doing a command like below.

dsquery user {Distinguished name of OU} -samid * | dsmod user -pwd {password}

If you dont know the Distingusihed name of the OU then download AD explorrer and browse to your OU in the right pane it will show you the distinguished name field. You can copy that into the {DN of OU} field.
or use:
ADFIND -b "DN of TARGETED OU" -f "(&(objectCategory=person)(objectClass=user))" -dsq | ADMOD "pwdLastSet::0" -kerbenc "uniCodePwd::<YOUR PWD>"
this will set the password for all users in the same OU to the same value and at the same it will configure the option to change the password at next logon

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial