How to add a user to sodu Group

Source: Internet
Author: User

Add sudo to a command to execute the command with the permissions of the Super User. But not any user can use sudo. This command can be used only when the user belongs to The sudo group.

If you want to add a user to The sudo group, you can log on to the system as the root user and execute the mongodo command (this command is actually used to edit the/etc/sudoers file using vi, the/etc/sudoers file itself is read-only ). Find the line "root ALL = (ALL) ALL" in the file, and add a line "user ALL = (ALL) ALL" below ", in this way, the user is added to the sudo group.

Log on with a user and run a command with sudo, such as sudo login do :). The system will prompt you to enter the password. In this case, you need to enter the user password instead of the root password. If you do not want to enter the password, you can modify "user ALL = (ALL) NOPASSWD: ALL" when executing mongodo ".

This article from the "diaosi O & M male" blog, please be sure to keep this source http://navyaijm.blog.51cto.com/4647068/816628


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.