Solved

How to allow local win_2003_server users to change own password using VBscript and objUser.SetPassword ?

Posted on 2006-10-23
6
340 Views
Last Modified: 2010-08-05
Hi,
I want to allow local win_2003_server users to change their own password
(from a web portal gui) using VBscript and objUser.SetPassword. But it is only
working if I'm logged in as admin user. Is their a server permission/security
setting for this?

Cheers
/Per
0
Comment
Question by:perhag
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
6 Comments
 
LVL 71

Accepted Solution

by:
Chris Dent earned 250 total points
ID: 17787959

Hey Per,

You can call the ChangePassword method (it requires the original password):

' Create a WinNT or LDAP connection to the user account

Set objUser = GetObject("LDAP://CN=Some User,OU=Some OU,DC=YourDomain,DC=local")

objUser.ChangePassword strOldPassword, strNewPassword


HTH

Chris
0
 

Author Comment

by:perhag
ID: 17788089
I got the same error with ChangePassword:  "general access denied error" code: 80070005 line:6
My vbscript look like this (and is working for admin users):

strComputer = "bkv-sas5"
strOldPassword = "ludde123"
strNewPassword = "ludde1234"
Set objUser = GetObject("WinNT://" & strComputer & "/156, user")
objUser.ChangePassword strOldPassword, strNewPassword
objUser.SetInfo

It there any difference calling the LDAP connection?

//Per
0
 

Author Comment

by:perhag
ID: 17788129
I got it :-) I don't need objUser.SetInfo now!
Seems to work now!

//Per

0
 
LVL 71

Expert Comment

by:Chris Dent
ID: 17788447

:-D

Chris
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

by Batuhan Cetin In this article I will be guiding through the process of removing a failed DC metadata from Active Directory (hereafter, AD) using the ntdsutil tool in a Windows Server 2003 environment. These steps are not necessary in a Win…
ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

695 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question