01-B.18: Who is superuser?

Linux - The Penguin Marches On · LibreTexts

0%

Contents

    Text

    Size
    100%
    Theme
    Typeface
    Line length
    Spacing

    From LibreTexts, under CC BY-NC 4.0, as the source states it; its equations are written in TeX, which the PDF shows typeset. This page at LibreTexts.

    01-B.18: Who is superuser?

    Superuser

    In Linux there is a term - superuser. This refers to any user that has administrator privileges. The user of the administrative user is "root." Anyone with root access has the ability to do whatever they want, which is why we need to be careful as to who gets root access on our systems. Historically, you could log in to a Linux system as root by providing the appropriate password. Most distros do not allow root login anymore due to the security concerns associated with such access.

    So, the question is, how does one gain access to administrative privileges? There are a couple of methods we can use. Using the su command a user can switch to any user of the system. The su command stands for "switch user," "substitute user," and even "super user"...it depends on where you look. Issuing the command su - pbmac will ask you for pbmac's password. If you can provide the proper password, then your userid will be set to pbmac. If you do not provide a userid as in su -, or if you provide the userid of root - su - root, then you must provide the root password to become "superuser," or the root user.

    Be careful about changing to the root user as you have total authority and privileges on the system. As root it is possible to mess up the system really quickly to the point that your system is unusable, especially by inadvertently removing files or directories. So, be very careful about using su to become root for extended work.

    A better solution is to use the sudo command. Sudo allows a permitted user to execute a command as the superuser, or even as another user. We will talk more about the sudo command in a future lesson.

     


    This page titled 01-B.18: Who is superuser? was last modified on Mon, 03 Oct 2022 05:36:24 GMT and is shared under a CC BY-NC 4.0 license and was authored, remixed, and/or curated by Patrick McClanahan.