Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ su(1) — GL2 W2.5

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

env(1)

login(1)

sh(1)

environ(5)

SU(1)  —  Silicon Graphics

NAME

su − become super-user or another user

SYNOPSIS

su [ − ] [ name [ arg ... ] ]

DESCRIPTION

Su allows one to become another user without logging off.  The default user name is root (i.e., super-user). 

To use su, the appropriate password must be supplied (unless one is already super-user). If the password is correct, su will execute a new shell with the user ID set to that of the specified user.  To restore normal user ID privileges, type an EOF to the new shell. 

Any additional arguments are passed to the shell, permitting the super-user to run shell procedures with restricted privileges (an arg of the form −c string executes string via the shell).  When additional arguments are passed, /bin/sh is always used.  When no additional arguments are passed, su uses the shell specified in the password file. 

An initial − flag causes the environment to be changed to the one that would be expected if the user actually logged in again.  This is done by invoking the shell with an arg0 of −su causing the .profile in the home directory of the new user ID to be executed.  Otherwise, the environment is passed along with the possible exception of $PATH, which is set to /usr/local/bin:/usr/bin:/bin:/etc for root.  Note that the .profile can check arg0 for −sh or −su to determine how it was invoked. 

EXAMPLE

su bob

would cause the system to prompt for Bob’s password; if the password is typed in correctly, Bob’s identity is substituted for yours, so far as the system is concerned. 

FILES

/etc/passwdsystem’s password file
$HOME/.profileuser’s profile
~/.cshrcread by csh
~/.loginread by login csh

SEE ALSO

env(1), login(1), sh(1), environ(5). 

Version 2.5  —  April 22, 1987

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026