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