Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

su - substitute user ID

&pagelevel(4)&pagelevel

su starts a new shell under another user ID.


Syntax


su [-] [user]

The new shell is started as a login-shell, i.e. the scripts /etc/profile and $HOME/.profile are executed.

user

Name of the user id for the new shell; default: TSOS.

Hint

su can only be executed successfully if a default account for rlogin tasks is defined for the user ID specified (see operand POSIX-RLOGIN-DEFAULT in command MODIFY-USER-ATTRIBUTES).

File

/var/adm/sulog

File that records all executions of the su command, successful or not.

Example 1

Successful call of su

$ su

Password (TSOS):

# id

uid=0(TSOS) gid=0(SYSROOT) groups=0(SYSROOT)

# exit
$

Record in the sulog file:

SU 2011/05/10 13:56:26 + pts/0 FROEDE-TSOS

Example 2

Rejected call of su

$ su - sysaudit
Password (SYSAUDIT):

Sorry

$ id
uid=109(FROEDE) gid=2001(OS315) groups=2001(OS315),7777(dialout)

$

Record in the sulog file:

SU 2011/05/10 13:56:23 - pts/0 FROEDE-SYSAUDIT