• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 365
  • Last Modified:

Reset Local Admin Passwords via GPO

I have a script that I am using to reset the local admin passwords on my PCs via a GPO.  I put the following vbscript in the startup of the policy.

Set WshNetwork = WScript.CreateObject("WScript.Network")
Set objUser = GetObject("WinNT://" & WshNetwork.ComputerName & "/Administrator, user")
objUser.SetPassword "password"
objUser.SetInfo

It works great for XP, actually changes the password, but I get a script error on line #2 on Windows 2000 machines.

Any help you can give me would be greatly appreciated,

Dave
0
IFITDepartment
Asked:
IFITDepartment
2 Solutions
 
ChatableCommented:
First of all it's not a really good idea to reset the local administrator password by policy because then all your workstations would have the same password, and since extracting the password from the local system is not too difficult (if you know what you're doing), you are potentially giving anyone control over all workstations. It's better to set a different password for every computer and maintain control using a domain administrator user.
However if you still would like to enforce the password, you may use the following batch command:
net user [username] [password]
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now