Team su temporarily changes the logged in user of a shell session. It’s different from the command sudo which grants the currently logged on user the right to execute commands with elevated privileges.

Purpose of the su and sudo commands

Team su changes your registered session shells from one user account to another. This practice is useful for troubleshooting user permission issues. You must have an account password in order to access it through su.

If you are doing su without specifying a user account, the system assumes that you intend to use the root account You must know the root account for this process to work.

Upon completion session su enter command exit, to sign out of the replaced account and return to the originally registered account.

people just love tell stories that su and sudo mean. Generally, one can use a mnemonic such that su — this is substitute user, a sudoas a replacement user. Team su is not a «super user» command. Commands are commands; if you spend too much mental space thinking they are «worth something», you lose a bit of the flexibility these related commands offer.

In contrast to this, sudo is designed to grant elevated permissions to a single command. For example, updating packages requires elevated permissions; a regular user account cannot perform this function. But if this account is enabled as sudoer it can cause sudo, and then a privileged command or program.

It’s a myth that sudo allows you to run commands as the root user. Default sudo is functionally equivalent to the root because most people don’t change permissions and role. provided in the sudoers file. However, a competent system administrator will limit the scope sudo the minimum necessary programs that are required by individual users in the context of the policies and procedures of this system.

Various distributions handle Accounts sudo and root in different ways. Some distributions require that a root password be created when the system is installed; others suppress root by default and rely on sudo for administrative purposes. Refer to your distribution’s pages for specific instructions on these important utilities.

Похожие записи