Ubuntu set Current user sudo password free

Source: Internet
Author: User

1. Back up sudo files

sudo CP /etc/sudoers.

2. Add the current user to the Sudo group

Note that this file can only be edited with VI

Try using Visudo to edit/vi//sudoers first

sudo visudo

If the above instruction fails, use VI to open the edit

sudo VI /etc/sudoers

Find root  all= (all:all)All, add a similar line below

Kube all= (All:all) all

3. Set the current user-free password

Use Visudo to open sudoers and edit

sudo visudo

Add NOPASSWD to the content you just edited:

Kube all= (All:all) Nopasswd:all

4. Re-login Test

sudo ls

If you do not prompt for a password, the configuration succeeds

5. With the above steps, the Ubuntu desk version sudo can be free of encryption, if the server version also needs to be edited

sudo visudo

Modify%sudo This same, keep all sudo instructions free of secrets

%sudo    nopasswd: All

Re-login again to verify.

Ubuntu set Current user sudo password free

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.