Solved

Local Admin Passwords

Posted on 2010-08-25
11
471 Views
Last Modified: 2013-12-26
Answer Worth 500 Points!

Objective: In a 2003server / XP Client enviroment - Deploy a solution to quickly change/reset administrator local password in automation. One-time only logon change needed.

Current Solution: Scripting a logon with Group Policy to change local admin password.

Problem: Does not work with current client access- will require admin rights. An need a work around.

On Error Resume Next
Set objOU = GetObject("LDAP://OU=Computers, OU=Engineering, DC=<SERVER>, DC=LOCAL")
objOU.Filter = Array("Computer")

For Each objItem in objOU
    strComputer = objItem.CN
    Set objUser = GetObject("WinNT://" & strComputer & "/Administrator")
    objUser.SetPassword("Password")
Next

Wscript.Echo "Passwords have been changed.!"
0
Comment
Question by:Jmarcomb
  • 5
  • 3
  • 2
11 Comments
 
LVL 57

Expert Comment

by:Mike Kline
ID: 33523897
Do you have any Windows Vista/7/2008 boxes anywhere in your domain.  If you do you can use group policy preferences to do this

http://abskb.spaces.live.com/blog/cns!8834054641A09100!1071.entry?sa=500679251

Thanks

Mike
0
 

Author Comment

by:Jmarcomb
ID: 33524265
I have a few windows 7 clients. The directions in the link are unclear for me to proceed.
0
 
LVL 57

Expert Comment

by:Mike Kline
ID: 33524609
So with Windows 7 clients you can use GPP, Darren has a good overview here

http://www.gpoguy.com/Portals/0/Group%20Policy%20Preferences%20Overview.pdf

The XP machines will need some pre-reqs.

I'll also add the VBScript zone to this question

Thanks

Mike
0
How Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

 

Author Comment

by:Jmarcomb
ID: 33525600
Resarching your solution..
0
 
LVL 65

Accepted Solution

by:
RobSampson earned 500 total points
ID: 33527512
Hi, first off, the script you have should not be run at logon, because it runs against multiple computers each time it is run.

All you should need is a startup script (under Computer Configuration) applied to the OU in question, with the following code:

    Set objNetwork = CreateObject("WScript.Network")
    strComputer = objNetwork.ComputerName
    Set objUser = GetObject("WinNT://" & strComputer & "/Administrator")
    objUser.SetPassword("Password")

Regards,

Rob.
0
 

Author Comment

by:Jmarcomb
ID: 33554154
Still working solution.. Will have an answer monday. Thanks.
0
 

Author Closing Comment

by:Jmarcomb
ID: 33562301
There are other options. This one is the best way for my network.
0
 
LVL 65

Expert Comment

by:RobSampson
ID: 33563341
Thanks for the grade.

Regards,

Rob.
0
 

Author Comment

by:Jmarcomb
ID: 33566445
Ok- I jumped the gone on this topic. It did not work with group policy from the domain controller to clients using XP. It would however work from locl machine group policy. That is not the desired effect. I want to control it from a central location.
0
 
LVL 65

Expert Comment

by:RobSampson
ID: 33572636
For it to work from domain Group Policy, you need to have it as a StartUp script, under Computer Configuration, and you should be pointing the policy to the script that you have copied directly into the NetLogon share of your domain controllers.

Regards,

Rob.
0

Featured Post

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

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

Restoring deleted objects in Active Directory has been a standard feature in Active Directory for many years, yet some admins may not know what is available.
Last week, our Skyport webinar on “How to secure your Active Directory” (https://www.experts-exchange.com/videos/5810/Webinar-Is-Your-Active-Directory-as-Secure-as-You-Think.html?cid=Gene_Skyport) provided 218 attendees with a step-by-step guide for…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

830 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