Question : Searching for user account  in LDAP

Hi..

I wrote the following script to change some user's account info in Active Directory using (VBScript):

Set objOU = GetObject("LDAP://cn=cn1, ou=OU1, dc=dc1, dc=dc2")
objOU.Put "wWWHomePage", "http://www.111222333.com/"
objOU.SetInfo

This script works fine if the user account is directly under OU1.  But if the user is under sub-OU of OU1 it gives an error that the object is not found...
The Question: How to find the user even if he is under sub-OUs?

The other question: How can I search by login name instead of cn ( Name)?

Answer : Searching for user account  in LDAP

PAQed with points (500) refunded

DarthMod
Community Support Moderator
Random Solutions  
 
programming4us programming4us