Add new users in linux and grant sudo execution Permissions

Source: Internet
Author: User

In linux, add new users and grant sudo execution permissions. 1. Add new users adduser xyw-Eliot. 2. Set the passwd xyw-Eliot password. Enter the password three times as prompted when using the sudo command, the following message is displayed: sudo: must be setuid root error, that is, the sudo command cannot be used. Solution: Use su to enter the root user and run: chown root: root/usr/bin/sudo chmod/usr/bin/sudo run the sudo command again. the following error occurs: xyw-Eliot is not in the sudoers file. this incident will be reported. it indicates that xyw-Eliot still does not have the permission to use sudo. Solution: 1) Enter su to enter the root mode. 2) Add the write permission to the file: chmod u + w/etc/sudoers 3) edit the file/etc/sudoers, that is, vim chmod u + w/etc/sudoers, find the "root ALL = (ALL) ALL" line and add xyw-Eliot ALL = (ALL) ALL to change xyw-Eliot to your username based on the actual situation. Save and exit. 4) revoke the file write permission: chmod u-w/etc/sudoers

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.