CENTOS7 disable each sudo need to enter a password

Source: Internet
Author: User

When you finish installing CENTOS7, sudo is not enabled by default, and sudo should be set first.
Sudo is the role of the current non-root user in the use of the command without permission, directly before the command to add sudo, enter their current user's password to complete the root user function, and do not have to use Su-back and forth to switch users. Sudo's configuration file is located in/etc/sudoers and requires root permission to read and write.
Locate the root all= (all) all line and add a line at the end (without the quotation marks):
"Username all= (All) All"
Where username is the specified user using sudo, the space within the quotation marks is tab
If you want to prompt you to enter the root password every time you use the sudo command, move to this line:
#%wheel all= (All) all
Unblock # comment
If you do not want to prompt you to enter and password each time you use the sudo command, move to the following line:
#%wheel all= (All) Nopasswd:all
Unblock # comment
Exit after saving
To add a user name to the wheel user group:
USERMOD-G Wheel Username

Ubuntu sudo password free

sudo password free:$ sudo vi/etc/sudoers%sudo all= (all:all) nopasswd:all%admin all= (All) Nopasswd:all----------------- ------------------------from http://www.cnblogs.com/yudar/p/4425518.html

CENTOS7 disable each sudo need to enter a password

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.