Well,
I got this program to work using LDAP for accessing Active Directory to change the password.
The main reason for me doing this was so the user account I use for these operations did not have to be a Domain Admin. I can now just use a regular Domain User account, and just delegate the needed permissions via the OU that holds the user accounts, that you want to be able to reset with this tool.
The persmissions I assigned to the user account for resetting passwords at the OU level:
Change Password
Reset Password
Read/Write Account Restrictions
Read pwdLastSet
Write pwdLastSet
Read lockoutTime
Write lockoutTime
I'm not sure if you need all these permissions, but these are the permissions that were used by similar commercial products I tested.
I made quite a few additions to the resetpass fuction in the reset_pass.asp and adminreset.asp, and have attached the files with the additions I made. I also commented out some of the commands as they did not seem to be working with the LDAP commands.
Below is the Code added at the beginning of the resetpass function. You have to enter your NetBiosName, but maybe this can be added to the config file which holds the other Global variables.
' Specify the NetBIOS name of the domain and the NT name of the user, Change NetBiosName to your NetBiosName.
strNTName = "NetBiosName" & "\" & strusername
' Use the NameTranslate object to convert the NT user name to the
' Distinguished Name required for the LDAP provider.
Set objTrans = CreateObject("NameTranslate")
' Initialize NameTranslate by locating the Global Catalog.
objTrans.Init ADS_NAME_INITTYPE_GC, ""
' Use the Set method to specify the NT format of the object name.
objTrans.Set ADS_NAME_TYPE_NT4, strNTName
' Use the Get method to retrieve the RPC 1779 Distinguished Name.
strUserDN = objTrans.Get(ADS_NAME_TYPE_1779)
'END OF CODE FOR LDAP to replace Getobject("WinNt:
Then I commented out: 'Set objUser = GetObject("WinNT://" & FQDN & "/" & strusername & ",user") and replaced with:
Set objUser = GetObject("LDAP://" & strUserDN)
The force password reset no longer worked, so I replaced this command with:
objUser.Put "PwdLastSet", 0
The code probably needs a little cleaned up, as I did not remove any code, but instead just commented it out.
I thinking I'm just ready to roll this out on our production network. ResetPass.zip