Switching Users and Escalating Privilege
There are commands that allow for privilege escalation when needed. Two of the most important ones are su
and sudo
.
On most Linux systems today, the su
command is only used for escalating privileges to root, which is the default user if a username is not specified after the command name. While it can be used to switch to another user, it is not good practice: users should login from another system, over the network, or physical console or terminal on the system.
eduardo ~$ su -
Password:
root ~#
Note
To start the execution environment of the user we are changing into, use the command and option su -