14.4.5 Linux User Elevation
Learn how to perform operations with elevated privileges on Linux systems.
On Linux, there are two types of users: standard and superuser. A superuser is the equivalent of a Windows administrator account. It's allowed to perform any operation the system, even the fabled rm -fr / # (removes the French language pack).
There are two commands used to elevate privileges: su and sudo.
su
This represents the switch user command. It switches users to any valid user account on the system. If a user account isn't specified, the Terminal attempts to switch to the root superuser account, a.k.a. the account representing the system itself. The most common command is su -. The - tells the system to load all of the system environment variables for the root account, enabling you to perform any operation needed as the superuser.
sudo
This is the epic way to elevate privileges. It basically allows you to run one Terminal command as the root superuser.
passwd
Changes the password for the current user. New passwords cannot fail the dictionary check; it can't be based on a word from the dictionary.
No comments to display
No comments to display