Becoming another user on a system (su command)
You can change the user ID associated with a session (if you know that user's login name) by using the su (switch user) command.
For example, if you want to switch to become
user joyce
, at the prompt, type the following:
su joyce
If the password: prompt
is displayed, type the password for user joyce
. Your user
ID is now joyce
. If you do not know the password, the request
is denied.
To verify that your user ID is joyce
,
use the id command.