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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

RUNAS command

Status
Not open for further replies.

TOMMYyT

MIS
Nov 6, 2001
13
US
Is there a way to pass a password into the runas command?
 
You can use the Echo command:
Echo Password|Runas .........
 
I got the error below. I tried putting the echo command on the line before the runas command. There is no error but the comand dosen't work.

W:\Documents and Settings\ta83606\Desktop>echo pw | runas /user:erdhfdctx015\eccc\ notepad.exe
Enter password for erdhfdctx015\eccc\:
RUNAS ERROR: Unable to change echo mode
W:\Documents and Settings\ta83606\Desktop>pause
Press any key to continue . . .

 
Sorry, i tried it with the runas command and it also failed. We use the command every day with the Su-Service, and there it works. So i thought this is also possible with the runas command.
maybe you can use the Su, the service does the same as runas and you can use it under NT4.
 
I thought the Runas command just prompted you for the password when needed?

runas /profile /user:mymachine\administrator cmd

then the passwould would be asked for after trying to run the command.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top