[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 854
  • Last Modified:

Change Administrator Account on Multiple Computers

Hello,
I need to rename and change the password for the local administrator account on my Window XP Pro machines.  Is there a script of utility that I can use to accomplish this.  Any help is appreciated.

Thanks in advance
0
GilardiCo
Asked:
GilardiCo
1 Solution
 
AJermoCommented:
If you are in an active directory domain you can use a machine group policy to accomplish this. If you need to apply it only to specific machines you can create/move them into a specific OU   OR create a security group, add those machines, then specify the GPO to only allow that security group to read the GPO.
hope that helps,
changing the password can be done with a machine startup script via the same GPO.
"ChngAdminpw.bat"
net user <newadminname> <newpassword>
0
 
GilardiCoAuthor Commented:
This works good to change the password, however I need to also rename the administrator account.
0
 
and235100Commented:
http://searchwindowssecurity.techtarget.com/generic/0,295582,sid45_gci1133218,00.html

Check the discussion here: http://www.mcse.ms/message1188502.html
The 2nd script can be used to change the local admin account name to random 15 characters...
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
GilardiCoAuthor Commented:
That should work, I just need to change it to a specific name.
0
 
and235100Commented:
' This code renames the local administrator account.
' ------ SCRIPT CONFIGURATION ------
strComputer = "."
strNewName = "<NewUserName>"  ' e.g. mike
' ------ END CONFIGURATION ---------

set objComputer = GetObject("WinNT://" & strComputer)
set objUser = GetObject("WinNT://" & strComputer & _
                        "/Administrator,user")
set objNewUser = objComputer.MoveHere(objUser.ADsPath,strNewName)
WScript.Echo "Successfully renamed account to: " & strNewName

Push this out as a startup script...
0
 
GilardiCoAuthor Commented:
That worked, thanks for the help.
0
 
and235100Commented:
Glad that helped. Thank you.
0
 
GilardiCoAuthor Commented:
Hello there,

Your script works great, however if the Administrator account is already renamed then it comes up with an error.  Anyway to build in a if then type situation so if no Administrator account exists then do not run the rest of the script?

Once again any help is appreciated.
0
 
and235100Commented:
It might be better to ask a new question in the vbscript TA - there are some really good Experts in there...
Someone should be able to help quite easily.
After all - PSM's are supposed to ask one question "per question"...
;-)
0
 
Feroz AhmedSenior Network EngineerCommented:
Hi,
Right click on MyComputer select Manage and select Local Users and Groups and select the Administrator Account and right clik onto it and rename Administrator Account and once you are done with Renaming Administrator Account you can reset Password in the same way and in this manner you can change administrator account as well as reset password.
0

Featured Post

[Webinar] Improve your customer journey

A positive customer journey is important in attracting and retaining business. To improve this experience, you can use Google Maps APIs to increase checkout conversions, boost user engagement, and optimize order fulfillment. Learn how in this webinar presented by Dito.

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