First, my page is protected using NTFS authentication.  Therefore, I
know the user has already logged in.  Second, when the password change
page is accessed, I switch from HTTP to HTTPS.  That forces another
authentication to take place.

So, I pretty much know the user at that point and don't require them to
enter their previous password first.

I just have a couple of form fields to enter their new password twice.
I get their username from the session.

Below is a snippet of code that performs that actual password reset.

<snip>
<cfset args = "user #session.objUser.getUser()# #form.password#
/domain">

<cfsavecontent variable="results">
        <cfexecute name="c:\windows\system32\net.exe" arguments="#args#"
timeout="10" />
</cfsavecontent>
</snip>

If you want the user to enter their previous password, so you can test
it, then just make a simple CFLDAP query against Active Directory.  Pass
their username and password (from the form) into the CFLDAP tag.  If it
succeeds, then all is well, and you can then reset their password.

M!ke

-----Original Message-----
From: Ian Vaughan [mailto:[EMAIL PROTECTED] 
Sent: Monday, February 05, 2007 8:42 AM
To: CF-Talk
Subject: RE: Resetting Active Directory Password using CFLDAP ?

Mike

I can use cfexecute but how would I implement that ?

For example I have a web form that the user completes entering their
active directory login ID and memorable data, and if correct they can
set a new password for their account.

How would you use 

Use cfexecute to run:
net user <username> <password> /domain

In the form processing page to authenticate the user, and then if
authenticated allow them to change their password ? 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Upgrade to Adobe ColdFusion MX7 
Experience Flex 2 & MX7 integration & create powerful cross-platform RIAs 
http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:268673
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to