How to fix “XXX is not in the sudoers file” error

Question: I am trying to use sudo to run some privileged command on my Linux. However, when I attempt to do so, I am getting “[my-user-id] is not in the sudoers file. This incident will be reported.” error message. How can I resolve this sudo error? sudo is a program which enables specific groups of […]
Continue reading…

 

How to define PATH environment variable for sudo commands

Question: I built and installed a program in /usr/local/bin. The program requires root privilege to run. But when I try to run the program with sudo, I get “sudo: XXXXX: command not found” error. Somehow /usr/local/bin is not included in the PATH environment variable. How can I fix this problem? When you run a program […]
Continue reading…

 

How to use sudo without password prompt on Linux

Question: How can I use sudo without entering a password on Linux? sudo allows a system administrator to grant certain users (or groups) a permission to run privileged commands on Linux system. In order to run a command with sudo, users have to type their own password at a password prompt. To allow a specific […]
Continue reading…