Well-known Root, do you know this?

Source: Internet
Author: User
Tags superuser permission

Well-known Root, do you know this?
GuideWhy is there a specific account named root in Linux? How can I use the root account? In what scenarios must it be used and in which Scenarios cannot it be used? If you are interested in the above questions, please continue reading.

In this article, we provide some references about the root account for your convenience.

What is root?

First, remember this. In Unix operating systems, the hierarchical structure of directories is designed as a tree structure. The starting directory is a special directory with a slash. Because this structure is similar to a tree in reality/Is also called the root directory.

, We can see the output of the following command:

$ Tree-d/| less

This command demonstrates the analogy between the root directory and the root directory.

Linux directory level

Although the root account name is not clear, it may be because the root account is the only account with write permission in the root directory.

In addition, because the root account can access all files and commands in Unix operating systems, it is also called a Super User.

In addition, the root directory and directory cannot be confused. The root directory is the home directory of the root account. In fact, the root directory is a subdirectory of the root directory.

Get root permission

When talking about root (or Super User) permissions, we mean the permissions of an account that includes (but is not limited to) system permissions) modify the system and authorize other users to access system resources.

The root account is used randomly. If the system crashes, the system is completely faulty. This is why the following principle is to use the correct posture of the root account:

First, use the root account to runCompile do command EditIn the/etc/sudoers file, grant the minimum superuser permission to the specified account (for example, supervisor.

The minimum superuser permissions can be included, such as adduser and usermod.

Next, use the supervisor account to log on and useSudo executes user management tasks. At this point, you may find that you fail to execute other tasks that require the superuser permission (for example, deleting a software package.

You are not authorized to run the command.

When you must use the superuser permission, repeat the preceding two steps.The exit command is returned to the account without special limits.

At this point, you need to determine if other periodic tasks require superuser permissions? If necessaryIn/etc/sudoers, grant necessary permissions to the specified account or group, and avoid directly using the root account.

Summary

This document serves as a simple reference for correctly using the root account in Unix operating systems. Add it to favorites and you can read it at any time!

Address: http://www.linuxprobe.com/root-knowledge.html


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.