Groups | Blog | Home
all groups > iis security > october 2005 >

iis security : Changing passwords WITHOUT OWA


greggysmail NO[at]SPAM gmail.com
10/11/2005 9:18:35 AM
Hi

I have only found one other post on this topic and that was for IIS 4.0

I am running IIS 6.0 on a windows 2003 small business server box.

We host a website to which our customers need a login to enter. These
logins are set up as domain logins on the sbs box. We would like these
customers to have the ability to change their passwords from the
outside world, but we dont want to have to make them log in to Outlook
web access in order to do it.

Surely there is a way around this. Can anybody help me?

Greg
Rashad Rivera
10/15/2005 8:20:52 PM
There is. You can use the ADSI interface. Use the ChangePassword function
of the ADsUser object for the use's account. Then you must pass the old,
and the new passwords into this function:


' VBScript

on error resume next
err.clear
Dim usr
set usr = GetObject("WinNT://MyDomain/TheUser,user")
usr.ChangePassword szOldPass, szNewPass

if err.number <> 0 then
Response.Write "Your password was not accepted"
else
Response.Write "Your password was changed"
end if


//JScript
var usr = GetObject("WinNT://MyDomain/TheUser,user");
try {
usr.ChangePassword(szOldPass, szNewPass);
Response.Write("Your password was changed");
} catch (_e_) {
Response.Write "Your password was not accepted"
}

[quoted text, click to view]

AddThis Social Bookmark Button