[Ubuntu] sudoer - achishis2/achishis2.github.io GitHub Wiki
Open the sudoers file: sudo visudo will open the /etc/sudoers file in GNU nano. If not, try export EDITOR="nano" and try sudo visudo again.
Add the below line to the end of file.
username ALL=(ALL) ALL   Change the user name before you issue the commands
Then perform WriteOut with Ctrl + O. The editor will ask you for the file name to write into. The default will be /etc/sudoers.tmp:
File Name to Write: /etc/sudoers.tmp
Change that to /etc/sudoers:
File Name to Write: /etc/sudoers
A prompt will be displayed:
File exists, OVERWRITE ?
Or
Save file under DIFFERENT NAME ?
In both cases, press Y. Quit the nano editor with Ctrl + X.
Done!