penguintutor.com/linux/useradmin-reference
Trecho:
su
(Switch User)One of the features of Linux is the ability to change userid when logged into a system. This command su is sometimes referred to as superuser , however this is not completely correct. In the early days of UNIX it was only possible to change to the root user, which made for the superuser command however it is now possible to change to any user using the su command. It is more correct to refer to the command as the switch user command.
The switch user command
su
is used to change between different users on a system, without having to logout. The most common use is to to change to the root user, but it can be used to switch to any user depending upon the users settings. To switch to a different user other than root, then the username is used as the last option on the command.It is also possible to change to another user by putting the username after the
su
command. There are two ways of switching users. By putting a '-' after the command will cause the users profile to be read and variables to be set. Without the '-' the previous users settings will still remain.To use the new users profile and variables
su - username
To continue with the current profile and variables
su username
you can then return to the previous user by entering
exit
.