Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing passwords with ADSI

Status
Not open for further replies.

palagrim

Programmer
Apr 28, 2005
31
0
0
GB
Good afternoon,

I'm trying to figure out a way of changing an object in Active Directory's password through a webpage. Basically, we have around 3000+ accounts on our domain (workin in a school), and our Tech Support spends a lot of time resetting students passwords when they forget them. I'm trying to find a way of allowing teachers to log into our intranet (web based) and enter the students logon ID, clicking submit and the asp resetting the password. I know we COULD make them all domain admins and installed AD on every machine in the school... Painful... But I'd rather do it through a natty little web based form thing.

I have an asp script which will authenticate and allow changed of descriptions etc etc so all the permissions are set properly (i think)

I can change the password with:

call objUser.ChangePassword("oldpass", "newpass")

But obviously this is no good if the person in question has forgotten it.

I've also tried using objUser.SetPassword but this doesn't do anything (no error is reported, but the password isn't changed either...)

Does anyone have any ideas or am I barking up the wrong tree here?

Any help would be appreciated.
Thanks,
Craig.
 
[Edit]

Of course there IS an error with .SetPassword - General Access Denied...

Which is weird...

[/edit]
 

You need to perform the action under the role of an administrator with permission to change the password - if it was open for anyone to change it, there would be plenty of mayhem where security is concerned.

A smile is worth a thousand kind words. So smile, it's easy! :)
 
Thanks man,

Had a look through the IIS settings and lo and behold... someone had reset permissions on the file I was editing... Problem solved.

Thanks for replying :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top