Link to home
Start Free TrialLog in
Avatar of pedro011197
pedro011197

asked on

execute command to change local Administrator password at logon

Hi,
I have to change the local admin password of 500 computers runnig NT workstation. I want that when a computer logs on the domain, execute a command (e.g. "net user Administrador <password>").
This command needs administrator privileges to execute, but the user logging don't belong to the local Administrators group.
What can be done?

thanks in advance,
Pedro
Avatar of SysExpert
SysExpert
Flag of Israel image

How can I configure the RunAs utility to NOT prompt for a password?  ( Nt resource kit ?? )

 "The Runas utility is primarily designed to allow administrators to logon as an ordinary user, but to invoke a seconary logon,
 without logging off, in order to run administrative tools with administrator rights and permissions."

 The RunAs utility prompts for a password when run and can NOT be pre-configured with the password.

 The Microsoft solution is to use the SU.EXE tool.

 There is another alternative, if the task may be run in the backround:

 01. Use Start / Programs / Accessories / System Tools / Scheduled Tasks to create a task.

 02. Browse for a batch file, program, or schedule CMD.EXE.

 03. Set the task to run One time only.

 04. Set the time in the past by clicking the minutes and changing them.

 05. Set the credentials of the user you want to run this background job.

 06. Check Open advanced properties for this task when I click Finish, if you need to do step 08 or 09.

 07. Press Finish.

 08. If you scheduled CMD.exe, modify the Run line on the Task tab. This will force you to re-enter the credentials.

 09. If you don't want to leave this task in Scheduled Tasks after it runs, check the Delete the task if it is not scheduled to
 run again box on the Settings tab.

 10. In Scheduled Tasks, right-click the task and press Run.

------------------
I hope this helps !!
ASKER CERTIFIED SOLUTION
Avatar of Longbow
Longbow

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Longbow
Longbow

Hi Pedro,


The better way is to install SMS from Microsoft
 to install any software or execute some jobs.


I just tried this manually on ONE PC :

Install the service "Remote Command" from the resource kit,
 to a computer (first i map to it and copy the service file)

Then type the Dos command :
rcmd \\PC "net user Administrator password"
from my PC.

A way to automate is a batch file with a "for %x in () do"
dos command. And redirect the output to a file.
So you know wich PC have done the job.

Longbow.

Pedro,

I take it you can add scheduled tasks to each system without having to go over to them. If so then you can add a task close before midnicht on all machines and let this task run after 10 minutes or so. (Then at least no-one can see the plain readable new password.)
The AT task runs in admin priviliges if it was added by someone with such priviliges.
at /?   for more info on the AT command
for /?  for more info on the FOR command.

commmand:
 at \\machine 23:30 "net user administrator ..."

The following script searches your network for online workstations, then processes the MACHINES.TXT file and adds for each host found an AT instruction on that machine.
Note that the 'FOR /F'-line is one line until the three dots AND the double-quote.

--- begin ---
@echo off
set FILENAME=%TEMP%\Machines.txt
net view|findstr \\ >%FILENAME%
FOR /F "eol=  tokens=1 delims=\ " %%i in (%FILENAME%) do at \\%%i 23:30 "net user administrator ..."
--- end ---


Hope this helps.

Regards,
Eric
ADMINISTRATION WILL BE CONTACTING YOU SHORTLY.  Moderators Computer101 or Netminder will return to finalize these if still open in seven days.  Please post closing recommendations before that time.

Question(s) below appears to have been abandoned. Your options are:
 
1. Accept a Comment As Answer (use the button next to the Expert's name).
2. Close the question if the information was not useful to you, but may help others. You must tell the participants why you wish to do this, and allow for Expert response.  This choice will include a refund to you, and will move this question to our PAQ (Previously Asked Question) database.  If you found information outside this question thread, please add it.
3. Ask Community Support to help split points between participating experts, or just comment here with details and we'll respond with the process.
4. Delete the question (if it has no potential value for others).
   --> Post comments for expert of your intention to delete and why
   --> You cannot delete a question with comments, special handling by a Moderator is required.

For special handling needs, please post a zero point question in the link below and include the URL (question QID/link) that it regards with details.
https://www.experts-exchange.com/jsp/qList.jsp?ta=commspt
 
Please click the Help Desk link on the left for Member Guidelines, Member Agreement and the Question/Answer process for further information, if needed.  https://www.experts-exchange.com/jsp/cmtyHelpDesk.jsp

Click you Member Profile to view your question history and keep them all current with updates as the collaboration effort continues, to track all your open and locked questions at this site.  If you are an EE Pro user, use the Power Search option to find them.  Anytime you have questions which are LOCKED with a Proposed Answer but does not serve your needs, please reject it and add comments as to why.  In addition, when you do grade the question, if the grade is less than an A, please add a comment as to why.  This helps all involved, as well as future persons who may access this item in the future to seek help.

To view your open questions, please click the following link(s) and keep them all current with updates.
https://www.experts-exchange.com/questions/Q.20013420.html
https://www.experts-exchange.com/questions/Q.20146106.html
https://www.experts-exchange.com/questions/Q.20238635.html


To view your locked questions, please click the following link(s) and evaluate the proposed answer.
https://www.experts-exchange.com/questions/Q.11453978.html
https://www.experts-exchange.com/questions/Q.20065518.html

PLEASE DO NOT AWARD THE POINTS TO ME.  
 
------------>  EXPERTS:  Please leave any comments regarding your closing recommendations if this item remains inactive another seven (7) days.  Also, if you are interested in the cleanup effort, please click this link https://www.experts-exchange.com/jsp/qManageQuestion.jsp?ta=commspt&qid=20274643

Moderators will finalize this question if still open in 7 days, by either moving this to the PAQ (Previously Asked Questions) at zero points, deleting it or awarding expert(s) when recommendations are made, or an independent determination can be made.  Expert input is always appreciated to determine the fair outcome.
 
Thank you everyone.
 
Moondancer
Moderator @ Experts Exchange
Zero response, finalized by Moondancer - EE Moderator
Sorry Moondancer.
I mis your comment.

It seems the question were answered...
Or i don't understand something ?
Yes, Asker did not response, so I awarded you these points for the help you gave.
Moondancer - EE Moderator