runas -- execute a process as any user and/or group in a non-interactive manner

runas allows an administrator to run a process as any user on a Unix operating system, including the super-user in a non-interactive manner without having to login as that user .  Additionally, it provides a secure way for allowing normally unpriviledged users to execute selected programs as a super-user (or any other user on the system) in a secure manner.

There are two modes to runas.  The first mode allows defined system administrators to quickly and easily perform [non]interactive and remote commands as a [super]user, without having to su(1) to the super user [and then possibly su'ing again to the desired user] or using newgrp(1) to login to a new group.  This mode relies on the base gid and/or uid of the user in determining access control and in no way relies on an access control file.   The runas manual describes the command line and environmental options.

The second mode of runas allows junior level system administrators and non-system operators to perform a limited number of commands as another user (most often root).  The commands are defined on a command by command basis in an access control file.  This file is only referenced if the user executing runas is 1) not in the admin uid range or 2) not in the admin group.  The runas access manual describes the access control file format.   A sample runas access file is distributed in the release.

The current version of runas is written and maintained by Chris Carpinello.  While it is copyrighted, it is distributed under the terms of the GNU General Public License.  Runas is written using GNU development tools, including autoconf which allows it to be easily ported to many different flavors of Unix.  RUNSON lists the known systems where runas has been tested.  If you would like to be notified when a new version of runas is released or desire to be a beta tester, drop me a note.

The latest release is version 3.11.1.  Examine the changes to see the minor fixes from 3.11.0.  Source is available from the following location:

Other access control packages of note:

CU sudo has a long history and wide recognition, going as far as back as the early 1980's.  The current maintainer of CU sudo is Todd Miller (

op is based on Tom Christiansen's paper "Op: A Flexible Tool for Restricted Superuser Access", an invaluable read for anyone developing Unix-based user access control programs.  The perl version was translated into C by David Koblas ( in 1991.  The most recent maintainer is Howard Owen (, from 1995 to 1997.

Related links:
"Designing Secure Software" by Peter Galvin, Sun World, April 1998.
 Matt Bishop's Writing Secure SUID Programs
Last updated: August 2, 2000.