is not in the sudoers file
the issue: user is not in the sudoers file error occurs when attempting to run “sudo …” command
the resolution: this means exactly what it says, you (the current user) are not allowed to sudo stuff (as a different user). and in order to do so, you must be specified in the “sudoers file”.
run:
visudo
something similar to the following will appear
# /etc/sudoers # # This file MUST be edited with the 'visudo' command as root. # # See the man page for details on how to write a sudoers file. # Defaults env_reset # Host alias specification # User alias specification # Cmnd alias specification # User privilege specification root ALL=(ALL) ALL
note: the following is the format for the privilege specification:
[the user] [the terminal from where the user can use sudo] =([which user he may sudo on behalf of] ) [commands the user may run]
based on the note above you can configure your user very specifically. however, if you want to simply add your user to be able to sudo from EVERYWHERE, sudo’ing as WHOEVER, and performing ANY/ALL commands, add your user to the privilege specification:
# User privilege specification root ALL=(ALL) ALL myuser ALL=(ALL) ALL