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