Ubuntu set Current user sudo password free

Source: Internet
Author: User
Ubuntu Set Current user sudo password free Method 1
# backup/etc/sudoers
sudo cp/etc/sudoers.
#打开/etc/sudoers
sudo visudo
# Add LINUXIDC to the end of the file
All=nopasswd:all
Method 2

1. Back up sudo files

sudo cp/etc/sudoers.

2. Add current user to sudo group

Note that this file can only be edited with VI

First try using Visudo edit/vi//sudoers

sudo visudo

Use VI to open edit if the above instruction fails

sudo vi/etc/sudoers

Locate root all= (All:all) All and add a similar line below

LINUXIDC all= (All:all) all

3. Set the current login user to be free of secret

Use Visudo to open sudoers and edit

sudo visudo

Add NOPASSWD to the content you just edited:

LINUXIDC all= (All:all) Nopasswd:all

4. Re-login Test

sudo ls

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

5. Through the above steps, Ubuntu Desk version sudo can be free, if the server version also need to edit

sudo visudo

Modify%sudo This same, let all sudo directives be free of the secret

%sudo    all= (all:all) Nopasswd:all

Re-login again to verify.

LINUXIDC All=nopasswd:all

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.