Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


Need to change network logon via ADSI

Posted on 2003-10-31
Medium Priority
Last Modified: 2013-12-04
I work at a client that uses Windows 2000, AD-based security.  My workstation, like theirs, is Windows XP.  Unlike most of the client, I do not log on to the network, although I do have a network logon.  I provide it when I map drives, go to internal web sites, etc.

Since I'm not logged-on to the domain, I don't have ready access to anything to change my password.  I have to believe that I could put something together with VBScript and ADSI to do this and I'm looking for an example.
Question by:klamerus
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

Expert Comment

ID: 9658246
Change password easy.

Alt-Ctl-Del -> "Change Password..."

put your client site network ID into "User name" field

put the client domain name on which your account is registered into the "Log on to:" field

make sure the new password meets complexity requirements, hit OK

and Robert's your father's brother.

Author Comment

ID: 9668039
Robert who???

Author Comment

ID: 9668046
It is my impression that I can't use the Ctl-Alt-Del thing because I'm not logged on to the netowrk.  Is that wrong?

Accepted Solution

dukestaTAI earned 750 total points
ID: 9685972
The below code will change a password usind adsi.

'---the following lines have been added to ensure all required COM objects are available on your system.
' script uses the following components:
' nt.user
'---end of COM-object checking code---

set tool = CreateObject("nt.user")

if tool.ChangePassword("", "testaccount", _
"newpassword", "secret") then
MsgBox "Password has changed!"
     MsgBox "Couldn't change password: " & tool.GetLastError
end if

' --- the following code had been automatically added to ensure all required COM objects are installed.
function COMExists(name)
' checks whether a specific COM object is installed on
' your local machine
set cwsh = CreateObject("WScript.Shell")
on error resume next
dummy = cwsh.RegRead("HKCR\" & name & "\")
if err.number<>0 then
      COMExists = false
      COMExists = true
end if
end function
sub CheckCOM
if not COMExists("nt.user") then
      msg="COM-Object ""nt.user"" is required. This object is currently not installed on your system." & vbCr
      msg = msg & "Install NTUSER component from CD" & vbCr
MsgBox msg, vbExclamation

end if

end sub

Expert Comment

ID: 9685989
Yes your assumption is wrong.

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

Recently, a new law in my state forced us to get a top-to-bottom analysis of all of our contract client's networks. While we have documentation, it was spotty at best for some - and in any event it needed to be checked against reality. That was m…
No security measures warrant 100% as a "silver bullet". The truth is we also cannot assume anything but a defensive and vigilance posture. Adopt no trust by default and reveal in assumption. Only assume anonymity or invisibility in the reverse. Safe…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

705 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