Skip to main content
Engineering LibreTexts

01-B.18: Who is superuser?

  • Page ID
    26794
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)\(\newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    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? is shared under a CC BY-NC 4.0 license and was authored, remixed, and/or curated by Patrick McClanahan.

    • Was this article helpful?