Solution that the user is not in the sudoers file

Source: Internet
Author: User
Users are not included in the sudoers file. when using the Linux system, we usually use common users for routine operations, the root user is only used for permission assignment and system settings, and the password of the root user cannot be disclosed. Common users execute a solution that is not included in the sudoers file. in Linux, we usually use common users for routine operations, the root user is only used for permission assignment and system settings, and the password of the root user cannot be disclosed. When a common user executes a System program, he or she needs to temporarily escalate permissions. sudo is a common command. he or she only needs to enter the current user password to temporarily escalate permissions. When using the sudo command, we often encounter prompts that the current user is not in the sudoers file. what if this problem is solved? The following steps can be used to solve the problem easily. 1. switch to the root user permission Last login: Tue Sep 24 20:50:51 2013 from 192.168.30.171 [user @ Compile ~] $ Su root password: [root @ Compile user] #2. View/etc/sudoers file permissions. if you have read-only permissions, change to writable permission [root @ Compile user] # ls-l/etc/sudoers-r -- r -----. 1 root 4030 00:57/etc/sudoers [root @ Compile user] # chmod 777/etc/sudoers [root @ Compile user] # ls-l/etc/sudoers-rwxrwxrwx. 1 root 4030 00:57/etc/sudoers [root @ Compile user] #3. execute the vi command, edit the/etc/sudoers file, and add users who want to improve their permissions; find root ALL = (ALL) ALL in the file and add the user information for permission escalation under this row, for example, root ALL = (ALL) ALLuser ALL = (ALL) ALL description: format: (host in the user name Network = (command range executed by the target user who executes the command) 4. save and exit, and restore the access permission of/etc/sudoers to 440 [root @ Compile user] # chmod 440/etc/sudoers [root @ Compile user] # ls-l/etc/sudoers-r -- r -----. 1 root 4030 September 25 00:57/etc/sudoers [root @ Compile user] #5. switch to a common user and test the user permission improvement function
 
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.