Need to change network logon via ADSI

Posted on 2003-10-31
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 250 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

10 Questions to Ask when Buying Backup Software

Choosing the right backup solution for your organization can be a daunting task. To make the selection process easier, ask solution providers these 10 key questions.

Question has a verified solution.

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

Users of Windows 10 Professional can disable automatic reboots using the policy editor. This tool is not included in the Windows home edition. But don't worry! Follow the instructions below to install (a Win7) policy editor on your Windows 10 Home e…
Our Group Policy work started with Small Business Server in 2000. Microsoft gave us an excellent OU and GPO model in subsequent SBS editions that utilized WMI filters, OU linking, and VBS scripts. These are some of experiences plus our spending a lo…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
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…
Suggested Courses

626 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