su

switch userid (UNIX)

Syntax:


su [-c] [userid [arguments]]

Options:

-c
Pass the specified list of arguments to the Shell.
userid
Switch to the specified userid.

Description:

The su utility lets a user temporarily become another user to perform a specific function, then return to their regular userid.

The su utility requests the password of the given userid (root, by default) and changes to that userid, invoking its shell but by modifying only essential elements of the environment. Only the HOME, PATH, and possibly SHELL environment variables are changed, but the new shell has the rights and privileges of the user specified. The new userid remains in effect until this shell exits.

Files:

/etc/passwd
This file defines the valid userids on the system.

See also: