SU(1) — USER COMMANDS
NAME
su − super-user, temporarily switch effective user ID
SYNOPSIS
su [ − ] [ username ] [ −c command ] [ −f ]
DESCRIPTION
su changes your login to that of the specified username. su asks for the password, just as if you were logging in as username, and, if the password is given, changes to that username and invokes the shell specified in the password file for that username, without changing the current directory. The user environment is thus unchanged except for HOME and SHELL, which are taken from the password file for the user being substituted (see environ(5V)). The new user ID stays in force until the shell exits.
If no username is specified, ‘root’ is assumed. To remind the super-user of his responsibilities, the Shell substitutes ‘#’ for its usual prompt.
OPTIONS
− The − flag performs a complete login. That is, it moves to the home directory, reads the .login file, and reads the .cshrc file for the new user-ID to configure the new shell.
−c command
execute command after logging in as the new user.
−f Perform a fast login. That is, do not change directories, do not read the .cshrc file, and do not read the .login file for the new user ID to configure the new shell.
If the − and -f flags are omitted, only the .cshrc file for the new user-ID is used to configure the new shell.
SEE ALSO
Sun Release 3.2 — Last change: 17 February 1986