Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Need to change network logon via ADSI

Posted on 2003-10-31
5
Medium Priority
?
212 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:Gene 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:Gene Klamerus
ID: 9668039
Robert who???
0
 
LVL 1

Author Comment

by:Gene 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 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
 
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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

This is a guide to the following problem (not exclusive but here) on Windows: Users need our support and we supporters often use global administrative accounts to do this. Using these accounts safely is a real challenge. Any admin who takes se…
OfficeMate Freezes on login or does not load after login credentials are input.
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Screencast - Getting to Know the Pipeline
Suggested Courses

927 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