Password reset for an entire OU 
Author Message
 Password reset for an entire OU

Hi. The script below resets a password for an invidual
user. How can I reset passwords for every user in an OU?
Thanks

Script:

Set objUser = GetObject _
 ("LDAP://cn=MyerKen,ou=management,dc=fabrikam,dc=com")
objUser.SetPassword "i5A2sj*!"



Sun, 26 Jun 2005 23:05:31 GMT  
 Password reset for an entire OU

Quote:

>Hi. The script below resets a password for an invidual
>user. How can I reset passwords for every user in an OU?
>Thanks

>Script:

>Set objUser = GetObject _
> ("LDAP://cn=MyerKen,ou=management,dc=fabrikam,dc=com")
>objUser.SetPassword "i5A2sj*!"

>.

Hi,

The method is to bind to the OU, then enumerate the user
objects in the OU and operate on each:

Set objCntr = GetObject
("LDAP://ou=management,dc=fabrikam,dc=com")
objCntr.Filter = Array("user")
For Each objUser In objCntr
  objUser.SetPassword "i5A2sj*!"
Next

Of course, you reset all users to the same password. A
refinement is to code two scripts, one to output all user
names (DistinguishedName) to a text file. The text file
can be modified as desired (delete admin accounts for
example). Then a second script reads the names from the
text file and resets the password for each. A further
refinement would be to add a password for each user to the
text file. Each user could have a different password. The
script would read the user name and password from the text
file.

Richard



Mon, 27 Jun 2005 02:34:10 GMT  
 Password reset for an entire OU
Great, thanks!

Quote:
>-----Original Message-----

>>Hi. The script below resets a password for an invidual
>>user. How can I reset passwords for every user in an OU?
>>Thanks

>>Script:

>>Set objUser = GetObject _
>> ("LDAP://cn=MyerKen,ou=management,dc=fabrikam,dc=com")
>>objUser.SetPassword "i5A2sj*!"

>>.
>Hi,

>The method is to bind to the OU, then enumerate the user
>objects in the OU and operate on each:

>Set objCntr = GetObject
>("LDAP://ou=management,dc=fabrikam,dc=com")
>objCntr.Filter = Array("user")
>For Each objUser In objCntr
>  objUser.SetPassword "i5A2sj*!"
>Next

>Of course, you reset all users to the same password. A
>refinement is to code two scripts, one to output all user
>names (DistinguishedName) to a text file. The text file
>can be modified as desired (delete admin accounts for
>example). Then a second script reads the names from the
>text file and resets the password for each. A further
>refinement would be to add a password for each user to
the
>text file. Each user could have a different password. The
>script would read the user name and password from the
text
>file.

>Richard
>.



Mon, 27 Jun 2005 23:41:22 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. How can I display a special cursor for the entire application till I reset it

2. How can I display a special cursor for the entire application till I reset it

3. How can I display a special cursor for the entire application till I reset it

4. How can I display a special cursor for the entire application till I reset it

5. Qualite image BMP ou TIF ou JPG ?

6. Access vers SQL/serveur ou Oracle : quels pi├Ęges ou conseils

7. Acquisition sur PC - serie ou // ou ...?

8. OU change password

9. OU change password

10. Helpdesk Reset NT Passwords

11. Password reset routine..

12. Password Reset Issue

 

 
Powered by phpBB® Forum Software