?
Solved

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

Posted on 2006-10-23
6
Medium Priority
?
341 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 1000 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

Technology Partners: 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

Setting up a Microsoft WSUS update system is free relatively speaking if you have hard disk space and processor capacity.   However, WSUS can be a blessing and a curse. For example, there is nothing worse than approving updates and they just have…
On July 14th 2015, Windows Server 2003 will become End of Support, leaving hundreds of thousands of servers around the world that still run this 12 year old operating system vulnerable and potentially out of compliance in many organisations around t…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

765 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