|
|
|
RUNAS (Windows 2000/XP)
Execute a program under a different user account.
syntax
RUNAS [/profile] [/env] [/netonly] /user: program
key
/profile Option to load the user's profile (registry)
/env Use current environment instead of user's.
/netonly Use if the credentials specified are for RAS only.
/user Username in form USER@DOMAIN or DOMAIN\USER
(USER@DOMAIN is not compatible with /netonly)
program The command to execute
Examples:
runas /profile /user:mymachine\administrator CMD
runas /profile /env /user:SCOT_DOMAIN\administrator NOTEPAD
runas /env /user:user@domain.microsoft.com "NOTEPAD \"my file.txt\""
NOTE: Enter user's password only when prompted.
Related Commands:
AT - Run a command on a remote machine (at a scheduled
time)
joeware.net - CPAU (Create Process
As User) like RunAs but with extra options for supplying the password.
Equivalent Linux BASH commands:
SU - Switch User