Sudo command in Ubuntu

Source: Internet
Author: User
When I installed Ubuntu for the first time, I felt that the setting was very simple, so I didn't care about it. But the second time it went wrong. The su command cannot be used, and the password is always incorrect. This means that root cannot be used to modify the system configuration file in the terminal state. The problem was not solved during reinstallation. Later, I checked the relevant files and found out that the Ubuntu root account is locked by default. After installation, the user account password is the same as the root password. However, some system operations on the gnome gui prompt that the password is incorrect.

When I installed Ubuntu for the first time, I felt that the setting was very simple, so I didn't care about it.

But the second time it went wrong. The su command cannot be used, and the password is always incorrect. This means that root cannot be used to modify the system configuration file in the terminal state. The problem was not solved during reinstallation.

Later, I checked the relevant files and found out that the Ubuntu root account is locked by default. After installation, the user account password is the same as the root password. However, some system operations on the gnome gui indicate that the password is incorrect. (The first installation, because the password does not use a special symbol, the second addition of the special symbol in the password, it seems that there is a problem. This may be because the root password does not support special characters in terminal mode. This is probably the reason for my analysis)

Finally, use the sudo command to solve this problem. The process is as follows:

Sudo passwd root
Enter your dmtsai password:
Enter the UNIX root password:
Confirm the UNIX root password:

About The sudo command:

The system administrator can use it to assign certain permissions to common users. This not only reduces the number of root logins, but also limits normal users to execute some commands under root. As I know, not only Linux, but also Unix commands.

To achieve this, you need to configure sudo. (I am just a common user. Can I easily change the root password? I don't know if the server version has this vulnerability .)

As for the specific configuration method, I am still learning. Next communication. (Zhongyuan prodigal son/Article)

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.