Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Add users to a local group

Status
Not open for further replies.

ecafracs

IS-IT--Management
Aug 21, 2002
93
0
0
PH
Hi all, I wanted to add users to a local group via a login script but the command requires me to perform the "runas" command. Is there anyway I can input the administrator password automatically so the command would run without the end user typing in the password.

runas /user:administrator net localgroup administrators Domain\account /add
 
Even if you runas a user then the user will still need to input the users password when prompted. The best bet would be to run the script from a machine with a user logged in that has admin rights. You do not have to run the script from the local machine.
 
I have found the solution for this. I used tcqrunas then from there specified the administrator account and password and do an echo off so the script would not display what the script is doing as well as hide the administrator password.

Thanks for the help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top