sudoers file setting sudo command no password (root password) login

Source: Internet
Author: User

Reference Blog: http://xvshell.iteye.com/blog/1838093

1. When the user executes sudo, the Linux system will look for the/etc/sudoers file, and it is active to determine if the user has permission to execute the sudo command
2. If the user has the ability to execute sudo, let the user enter their own password to confirm, here is more than the password to use root, praise
3. If the password is entered correctly, start executing the shell command followed by sudo
4. If you want to switch the same identity, and the SU command, do not enter the password

Hadoop all= (Root) nopasswd:all

That's fine.

Hadoop all=(all) All

This is not to say that you do not need to enter a password, but instead of using the SU command to switch to the root account to perform the operation of the root account. For example, create a new folder under/opt test. The original operation is the SU switch to root, enter the root password, after the operation is finished, exit returns to the current account. Now only sudo mkdir/opt/test, and then enter their own password can be done, similar to the one created in Ubuntu installation of the account (with the sudo command to execute the privileges), because the first time to execute the sudo privilege command when the password entered the life cycle, So it is not necessary to enter the password again in a short time.

One afternoon was killed by this, finally in 21:45 to solve, during the two games also watched Sydney fc2:1 Guangzhou Evergrande; Shanghai Port 2:1 Suwon Samsung.

sudoers file setting sudo command no password (root password) login

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.