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

Need batch file to change local administrator password

I have a domain with about 120 XP Professional computers. I am trying to find a batch file using the net command to change the local administrator password on all the computers. Something I can put in the login script.
0
jimbecher
Asked:
jimbecher
  • 4
  • 2
  • 2
  • +1
2 Solutions
 
Steven CarnahanNetwork ManagerCommented:
Why not use Group Policy?

Start the Group Policy snap-in, expand Computer Configuration, expand Preferences, click Control Panel, and then right-click Local Users and Groups. From the menu select New - Local User.  Select Update as the action, type Administrator into the User name text box, then type the new password into the Password text box, confirming the password in Confirm Password text box. Press OK.

This is if the local administrator account is named "Administrator"
0
 
jimbecherAuthor Commented:
I guess I needed to specify a little further. It is a 2003 AD. I do not see those options in a 2003 AD. I guess you need a 2008 AD?
0
 
junior15Commented:
The command is this:
net user administrator password

This will only work as a login script if the user logging in has admin rights. Also, if you put this in a login script, somebody could find it and see what the local admin password is because login scripts are plain text and everyone can read them if they know where to look.

You could use something that you run from your computer and changes the password on all the remote computers. Something like pspasswd which is part of the SysInternals suite that is now maintained by Microsoft.

You could also use an application like this: http://www.jdhitsolutions.com/pwdman/index.htm
Provide it with a list of the computers and it will do the rest.

Hope this helps.
0
Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

 
Steven CarnahanNetwork ManagerCommented:
Okay, you only need a 1 line batch file that has the following:

NET USER Administrator <password>

Again the user name must be Administrator.  This should be included in the Startup script and not the logon script because it needs to run with admin privelges.

CAUTION: The password is plain text this way.  
0
 
jimbecherAuthor Commented:
Thanks guys but Sysinternals came through again with pspasswd.exe :)
0
 
junior15Commented:
Glad we could help.
0
 
Steven CarnahanNetwork ManagerCommented:
Glad to be of assistance.  sysinternals is a great tool to have.  Glad junior15 remembered to mention it.  :)
0
 
Dileep kumarCommented:
i have unable to change local admin password because password field is gray out not changeable kindly give me solution
0
 
Steven CarnahanNetwork ManagerCommented:
If it is grayed out it means that the account you are using does not have administrator privileges. It needs to be in the local computers Administrator group.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

  • 4
  • 2
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now