The error means "Invalid Password".

Have you tried supplying the actual password(s)... :->

     User.ChangePassword strOldPassword, strNewPassword

HTH,
Tore.

-----Original Message-----
From: Jon Barnhardt [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 16, 2002 2:03 PM
To: ActiveServerPages
Subject: RE: active directory password change




Sorry here is the error I get:

error '80070056' 
/test/adpass.asp, line 25 


 -----Original Message-----
From:   Jon Barnhardt [mailto:[EMAIL PROTECTED]] 
Sent:   Friday, August 16, 2002 1:01 PM
To:     ActiveServerPages
Subject:        RE: active directory password change

I found a script that seems to do what I need but it errors on line 25 whats
wrong?  Also does this script need to be on the actual box that active
directory is on or another server that authenticates through it.  (Webserver
authenticating through MDC box?)

Here is the code:

<%

Dim strUser, strDomain, strFullname, strDesc, strOldPassword, strNewPassword

strUser = "mytestuser"
strFullname = "MyFullname"
strDesc = "MyDescription"
strOldPassword = "passtest"
strNewPassword = "MyNewPass"
strDomain = "MyDomain"


   ChangeUser
"mytestuser","MyDomain","MyFullname","MyDescription","MyOldPass","MyNewPass"

   Sub
ChangeUser(strUser,strDomain,strFullname,strDesc,strOldPassword,strNewPasswo
rd)
     Dim User
     Set User = GetObject("WinNT://" & strDomain & "/" & strUser & ",user")
     User.Fullname = strDesc
     User.Description = strDesc
     User.ChangePassword "newpass","passtest"    (Line 25)
   User.Setinfo
   Set User = nothing
 End Sub
%>


Thanks for any and all help beings I've never worked with ADSI before!


Jon
 -----Original Message-----
From:   Andrew Haslett [mailto:[EMAIL PROTECTED]] 
Sent:   Friday, August 16, 2002 12:10 AM
To:     ActiveServerPages
Subject:        RE: active directory password change

definately possible and actually not that difficult to intercat with AD
through the WEB.

Search for ADSI on MSDN and you'll find heaps of articles.

Cheers,
Andrew

-----Original Message-----
From: Jon Barnhardt [mailto:[EMAIL PROTECTED]]
Sent: Friday, 16 August 2002 9:01 AM
To: ActiveServerPages
Subject: active directory password change


I was wondering if anyone has ever created a way to create new users via the
web in active directory services on a windows 2000 adv server box.  Any
suggestions or sample code would be greatly appreciated.
We actually have to enable the 2000 users to change their passwords via the
web.  We are caught in an unexpected upgrade in exchange server that has to
be completed by Monday and at that point 2000 email users will have their
passwords reset to default.  We lack the manpower to change their passwords
by hand so we need a way to enable them to do it themselves via the web.
Thanks for any and all advice.

Jon

---
You are currently subscribed to activeserverpages as:
[EMAIL PROTECTED]
To unsubscribe send a blank email to
%%email.unsub%%



---
You are currently subscribed to activeserverpages as:
[EMAIL PROTECTED]
To unsubscribe send a blank email to
%%email.unsub%%

---
You are currently subscribed to activeserverpages as:
[EMAIL PROTECTED]
To unsubscribe send a blank email to
%%email.unsub%%

---
You are currently subscribed to activeserverpages as: [EMAIL PROTECTED]
To unsubscribe send a blank email to
%%email.unsub%%

---
You are currently subscribed to activeserverpages as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]

Reply via email to