Solved

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

Posted on 2006-10-23
6
338 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
  • 2
  • 2
6 Comments
 
LVL 70

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 70

Expert Comment

by:Chris Dent
ID: 17788447

:-D

Chris
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Suggested Solutions

So you have two Windows Servers and you have a directory/folder/files on one that you'd like to mirror to the other?  You don't really want to deal with DFS or a 3rd party solution like Doubletake. You can use Robocopy from the Windows Server 200…
A quick step-by-step overview of installing and configuring Carbonite Server Backup.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

828 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