Solved

Need to change network logon via ADSI

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

Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

Join & Write a Comment

SHARE your personal details only on a NEED to basis. Take CHARGE and SECURE your IDENTITY. How do I then PROTECT myself and stay in charge of my own Personal details (and) - MY own WAY...
In a recent article here at Experts Exchange (http://www.experts-exchange.com/articles/18880/PaperPort-14-in-Windows-10-A-First-Look.html), I discussed my nine-month sandbox testing of the Windows 10 Technical Preview, specifically with respect to r…
This video discusses moving either the default database or any database to a new volume.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

707 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

15 Experts available now in Live!

Get 1:1 Help Now