I've created a user using sudo useradd -m peris, then I want to change an executable JAR file permissions, but I got an error:

$ sudo chmod 500 menu-prices-update-0.0.1-SNAPSHOT.jar
[sudo] password for peris: 
peris is not in the sudoers file.  This incident will be reported.
  • You will need to set the user up with the command "visudo" Jul 20, 2018 at 12:15

1 Answer 1


You need to edit the /etc/sudoers and add the user peris into it. Either open the file with your favorite edit, for example vim:

$ sudo vim /etc/sudoers

and add the user there under root ALL=(ALL:ALL) ALL with the same syntax:

peris    ALL=(ALL:ALL) ALL

Or just edit it via the command visudo. NOTE: You must do this with root privileges, i.e. sudo.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .