I am trying to compile some sources using a makefile. In the makefile there is a bunch of commands that need to be ran as sudo
.
When I compile the sour
sudo
by default will read the password from the attached terminal. Your problem is that there is no terminal attached when it is run from the netbeans console. So you have to use an alternative way to enter the password: that is called the askpass program.
The askpass program is not a particular program, but any program that can ask for a password. For example in my system x11-ssh-askpass
works fine.
In order to do that you have to specify what program to use, either with the environment variable SUDO_ASKPASS
or in the sudo.conf
file (see man sudo
for details).
You can force sudo
to use the askpass program by using the option -A
. By default it will use it only if there is not an attached terminal.