Solved

Need to change network logon via ADSI

Posted on 2003-10-31
5
196 Views
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.
0
Comment
Question by:klamerus
  • 2
  • 2
5 Comments
 
LVL 1

Expert Comment

by:GeneriK
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.
0
 
LVL 1

Author Comment

by:klamerus
ID: 9668039
Robert who???
0
 
LVL 1

Author Comment

by:klamerus
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?
0
 
LVL 4

Accepted Solution

by:
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
 
CheckCOM
'---end of COM-object checking code---
 

set tool = CreateObject("nt.user")

if tool.ChangePassword("", "testaccount", _
"newpassword", "secret") then
MsgBox "Password has changed!"
else
     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
else
      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
0
 
LVL 1

Expert Comment

by:GeneriK
ID: 9685989
Yes your assumption is wrong.
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

The term "Bad USB" is a buzz word that is usually used when talking about attacks on computer systems that involve USB devices. In this article, I will show what possibilities modern windows systems (win8.x and win10) offer to fight these attacks wi…
OfficeMate Freezes on login or does not load after login credentials are input.
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

813 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now