Skip to main content
Engineering LibreTexts

01-B.18: Who is superuser?

  • Page ID
    26794
  • 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.

     

    • Was this article helpful?