p2p.wrox.com Forums

Need to download code?

View our list of code downloads.

  Return to Index  

proasp_codeclinic thread: SetPasword return network path not found in ADSI

Message #1 by "kah yew cheng" <kahyew@y...> on Tue, 12 Jun 2001 10:37:10
I am trying to add a user to an Active Directory using the following code:
Set cont = GetObject("LDAP://OU=Siebel,DC=adtest,DC=com")
Set usr = cont.Create("user", "CN=jsmith")

'---- Mandatory attributes----
usr.Put "samAccountName", "jsmith"

'---- Optional attributes, you may skip this----
usr.Put "sn", "Smith"
usr.Put "givenName", "James"
usr.Put "userPrincipalName", "jsmith@a..."
usr.Put "wWWHomePage", "type=Server username=CUSTOMER password=CUSTOMER"

'--Now that the user is created, reset the user's password and
'--enable its account.

usr.AccountDisabled = False
usr.SetPassword "secret"

The user will be created after the first SetInfo, however when it try to
setup the password, an error will be displayed:

error '80070035' network path not found

Anybody seen this error before? Appreciate your help


Kah Yew

  Return to Index