Solved

execute command to change local Administrator password at logon

Posted on 2001-07-05
8
259 Views
Last Modified: 2013-12-28
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
0
Comment
Question by:pedro011197
8 Comments
 
LVL 63

Expert Comment

by:SysExpert
Comment Utility
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 !!
0
 
LVL 10

Accepted Solution

by:
Longbow earned 200 total points
Comment Utility
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.
0
 
LVL 10

Expert Comment

by:Longbow
Comment Utility
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.
0
 
LVL 1

Expert Comment

by:eric27
Comment Utility

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
0
Too many email signature changes to deal with?

Are you constantly being asked to update your organization's email signatures? Do they take up too much of your time? Wouldn't you love to be able to manage all signatures from one central location, easily design them and deploy them quickly to users. Well, you can!

 
LVL 1

Expert Comment

by:Moondancer
Comment Utility
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.
http://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.  http://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.
http://www.experts-exchange.com/questions/Q.20013420.html
http://www.experts-exchange.com/questions/Q.20146106.html
http://www.experts-exchange.com/questions/Q.20238635.html


To view your locked questions, please click the following link(s) and evaluate the proposed answer.
http://www.experts-exchange.com/questions/Q.11453978.html
http://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 http://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
0
 
LVL 1

Expert Comment

by:Moondancer
Comment Utility
Zero response, finalized by Moondancer - EE Moderator
0
 
LVL 10

Expert Comment

by:Longbow
Comment Utility
Sorry Moondancer.
I mis your comment.

It seems the question were answered...
Or i don't understand something ?
0
 
LVL 1

Expert Comment

by:Moondancer
Comment Utility
Yes, Asker did not response, so I awarded you these points for the help you gave.
Moondancer - EE Moderator
0

Featured Post

Why spend so long doing email signature updates?

Do you spend loads of your time carrying out email signature updates? Not very interesting are they? Don’t let signature updates get you down. Let Exclaimer Cloud - Signatures for Office 365 make managing email signatures a breeze.

Join & Write a Comment

For a variety of reasons, it sometimes makes sense to reboot a Windows-based computer on a regular, perhaps daily basis. This "cures" a lot of ills by resetting processes, flushing caches, refreshing memory, and reestablish network connections. In a…
Sometimes drives fill up and we don't know why.  If you don't understand the best way to use the tools available, you may end up being stumped as to why your drive says it's not full when you have no space left!  Here's how you can find out...
This video Micro Tutorial explains how to clone a hard drive using a commercial software product for Windows systems called Casper from Future Systems Solutions (FSS). Cloning makes an exact, complete copy of one hard disk drive (HDD) onto another d…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now