Linux, Ubuntu

User is not in the sudoers file

If you are getting this message while you are trying to run a command that needs administrative rights, then your user probably is not allowed to use the sudo command!

The solution is simple. First of all, keep a backup of file /etc/sudoers. Then,

Either you run the visudo command with administrative rights to edit the sudoers file and append an extra line to the file, like this:

user_name   ALL=(ALL) ALL

or use the echo command:

echo “user_name ALL=(ALL) ALL” >> /etc/sudoers