runas
|
|
This article needs additional citations for verification. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed. (April 2008) |
In computing, runas is a command in the Microsoft Windows line of operating systems that allows a user to run specific tools and programs under a different username to the one that was used to logon to a computer interactively. It is similar to the Unix command sudo, but uses a completely separate account rather than adding privileges to an existing one.
Contents |
[edit] Microsoft Windows
The runas command was introduced with the Windows 2000 operating system, when the underlying CreateProcessAsUser() API that it uses was added.[1] Any application can use this API to create a process with alternate credentials, for example, Windows Explorer in Windows 7 allows an application to be started under a different account if the shift key is held while right-clicking its icon. The program has the ability to cache verified credentials so that the user only ever has to enter them once.
[edit] Syntax
runas [{/profile | /noprofile}] [/env] [/netonly] [/smartcard] [/showtrustlevels] [/trustlevel] [/savecred] /user:<UserAccountName> program
[edit] Examples
runas /noprofile /user:machine\administrator cmd runas /profile /env /user:domain\admin "mmc %windir%\system32\dsa.msc" runas /user:user@domain.example.org "notepad C:\filename.txt" runas /user:administrator /savecred "shutdown /i"
[edit] Inferno
The command is also included in the Inferno operating system.
[edit] Syntax
runas writes the user to /dev/user and invokes cmd with the given arguments.
runas user cmd [arg...]
Note: The command is only invoked if setting of the user name succeeds.
[edit] See also
- Comparison of privilege authorization features
- Principle of least privilege
- User Account Control, which disables the Administrator SID for the desktop, allowing it to re-enabled by exception.
[edit] References
- ^ "CreateProcessAsUser Function". Microsoft. http://msdn.microsoft.com/en-us/library/ms682429(v=vs.85).aspx. Retrieved 2011-07-21.
[edit] External links
|
||||||||||||||||||||||||||||||||
| This security software article is a stub. You can help Wikipedia by expanding it. |
| This Microsoft Windows article is a stub. You can help Wikipedia by expanding it. |