How to allow a user to run a single command as root via sudo

In order to allow a user to run a single command as root using sudo run the following as root:

Where user is the specified username and /bin/file if the path to the binary that we are allowing this user to run.

If you want to do further changes to the sudoers file it’s recommended to use the command ‘visudo’ to do so.