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.
LVL 11
jimbecherAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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
Build an E-Commerce Site with Angular 5

Learn how to build an E-Commerce site with Angular 5, a JavaScript framework used by developers to build web, desktop, and mobile applications.

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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Legacy OS

From novice to tech pro — start learning today.