How to add the current user to The sudo user group in Red Hat Linux

Source: Internet
Author: User

In Linux, the root user is a user with a high level of permissions, which threatens the security of the operating system, therefore, we usually use a common user name when operating the computer, and temporarily use the su command to switch to the root user only when super user permissions are set in some cases. But sometimes I don't want my root password to be told, but I also want to know how to do operations that exceed the security level of common users. At this time, I used the sudo command.

The sudo Command actually improves the running level of the current Command executed by the current user. For example, you need to edit a system configuration file, but only the root user can edit it. The common user is in read-only status, at this time, if you add sudo before your editing command, the execution gives you the permissions of the Super User. After entering sudo, you will find that the system requires you to enter the password. This is not the root user password, but the current login user password. If the password is correct, command.

It doesn't mean that any user can use the sudo command to obtain Super User Permissions. The premise is that you must be in the sudo user group. How can this group be defined, this user group can be configured in the/etc/sudoers file. If you want to add user1 To The sudo user group, you only need to copy the line configured by root, then change the root user name to user1. At this time, you can successfully find that the user user1 can be operated using the sudo command.

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.