NT Syntax

SU (Resource Kit)

Switch User.

      SU  "[cmdline]" [domain] [[Winsta\]Desktop] [options]

   cmdline        The command to run (default =%comspec%)
   domain         The domain for the user account ('.' = local m/c)
   Winsta\Desktop The profile to load (default = current)


  -cb console bypass
  -dn do not switch to new desktop
  -g  GUI option
  -l  load the .Default user registry hive
  -w  use current registry hive 
  -e  Inherit parent environment
  -b  batch logon 
  -i  interactive logon 
  -s  service logon
  -n  network logon
  -v  verbose

All LogOn Types require specific User Rights to be granted...
SeNetworkLogonRight, SeServiceLogonRight, SeInteractiveLogonRight, SeBatchLogonRight

Bugs: see Q265401

Related Commands:

In Windows 2000 they got this to work reliably:
or in the GUI - Shift, Right-click on an executable and select Run As.

A 3rd party freeware version of SU is available here

Equivalent Linux BASH commands:

su - Run a command with substitute user and group id

Simon Sheppard