- Changing local machine admin password
- Posted by Nathan Walter on February 25th, 2004
Is there a way to change the local machine admin password on workstations
using group policy or something else?
Thanks.
- Posted by Torgeir Bakken (MVP) on February 25th, 2004
Nathan Walter wrote:
Hi
You could do it in a computer startup script (with a GPO) that runs as
part of the boot up process (before the user logs in). It runs under the
system context and has admin rights.
As long as the Administrator account name is "Administrator", this vbscript
will set the password on the account:
sNewPassword = "testpassword"
Set oWshNet = CreateObject("WScript.Network")
sComputer = oWshNet.ComputerName
On Error Resume Next
Set oUser = GetObject("WinNT://" & sComputer & "/Administrator,user")
oUser.SetPassword sNewPassword
oUser.SetInfo
On Error Goto 0
--
torgeir
Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of the 1328 page
Scripting Guide: http://www.microsoft.com/technet/scriptcenter
- Posted by fswayty on February 26th, 2004
Please explain how or where I can do this setting?
"You could do it in a computer startup script (with a
GPO) that runs as
part of the boot up process (before the user logs in). It
runs under the
system context and has admin rights."
- Posted by Torgeir Bakken (MVP) on February 27th, 2004
fswayty wrote:
Hi
http://groups.google.com/groups?selm...GP12.ph x.gbl
and
Step 1: Create a Group Policy Object (GPO) the OU that this will be
applying to (you will need to have the computer objects for
the computers you want to run the script on in this OU).
- Start | Programs | Administrative Tools | Active Directory Users
and Computers
- Right click on the OU you want to create the policy for and select
"Properties"
- Choose the "Group Policy" tab
- Select the "New" button
- Name the Group Policy the name of your choice but be sure to name
appropriately to avoid confusion
- Click on the "Options" button
- Check the "No Override" box so this policy cannot be overridden from
any policies below
Step 2: Edit the GPO to utilize a Machine Startup Script for the OU.
- Click on the "Edit" button while viewing the Group Policy tab
- Navigate to Computer Configuration | Scripts (Startup/Shutdown)
- Right click on "Startup" in the right pane and choose "Properties"
- Click on the "Show Files" button and this will open a separate
window for this policy
- Copy the vbscript file created for this OU into this location
- Once the file is copied, close this window
- Hit the "Add" button in the "Startup Properties" window
- Choose the "Browse" button and this should open up and show you the
script file you just copied
- Select it and then choose "Okay" leaving the "Script Parameters" blank
- Click on "Okay" and close all Group Policy windows
--
torgeir
Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of the 1328 page
Scripting Guide: http://www.microsoft.com/technet/scriptcenter