runas

Source: Wikipedia, the free encyclopedia.
runas
Developer(s)Microsoft
Initial releaseFebruary 17, 2000; 24 years ago (2000-02-17)
Operating systemMicrosoft Windows
TypeCommand
LicenseProprietary commercial software
Websitedocs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-R2-and-2012/cc771525(v=ws.11)

In

logon to a computer interactively.[1] It is similar to the Unix commands sudo and su
, but the Unix commands generally require prior configuration by the system administrator to work for a particular user and/or command.

Microsoft Windows

The runas command was introduced with the

icon
. The program has the ability to cache verified credentials so that the user only ever has to enter them once.

Syntax

The command-syntax is:[3]

runas [{/profile | /noprofile}] [/env] [/netonly] [/smartcard] [/showtrustlevels] [/trustlevel:<TrustLevel>] [/savecred] /user:<UserAccountName> program

Parameters

This section is paraphrased from the runas /? command.

  • /noprofile: Speeds up the loading of the application by skipping the loading of the user's profile. Note that this might not speed up every application.
  • /profile: Do not skip loading the user's profile. This is the default setting.
  • /env: Use the actual environment, not the user's.
  • /netonly: Specifies that the given credentials are to be used for Remote access only.
  • /savecred: Credentials saved by the previous user. This setting is not available on Windows 7 Home or Windows 7 Starter Edition. This setting is left out from Windows XP Home Edition as well.
  • /smartcard: Specifies that the credentials will be supplied from a smartcard.
  • /user: Format is either USER@DOMAIN or DOMAIN\USER.
  • /showtrustlevels: Shows help (list of usable trust level parameters) for the /trustlevel switch.
  • /trustlevel: One of the trust levels listed by the /showtrustlevels switch.
  • program: Command line for the executable file. See examples below.

Note: Only type in the user's password, when the system asks for it.

Note: The /profile switch is not compatible with the /netonly switch.

Note: The /savecred and the /smartcard switches may not be used together.

Examples

runas /noprofile /user:machine\administrator cmd
runas /profile /env /user:domain\admin "mmc %windir%\system32\dsa.msc"
runas /user:[email protected] "notepad C:\filename.txt"
runas /user:administrator /savecred "shutdown /i"

Inferno

The command is also included in the Inferno operating system.[4]

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 username succeeds.

See also

References

  1. ^ Microsoft TechNet Runas article
  2. ^ "MS-DOS and Windows command line runas command".
  3. ^ https://ss64.com/nt/runas.html
  4. ^ "Inferno's RUNAS(1 )".

Further reading

External links

This page is based on the copyrighted Wikipedia article: Runas. Articles is available under the CC BY-SA 3.0 license; additional terms may apply.Privacy Policy