Skip to main content
edited tags
Link
Jeff Schaller
  • 68.8k
  • 35
  • 122
  • 267
deleted 4 characters in body
Source Link
techraf
  • 6.1k
  • 11
  • 36
  • 51

I am using LAMPP to run apache server. From a php file I am executing a python script which executes ssh, , scp commands. But I am getting error as:

sudo: no tty present and no askpass program specified

I looked for this error and as per suggestions I created wheel group in sudoerssudoers file as:

%wheel ALL=(ALL) NOPASSWD:ALL

%wheel  ALL=(ALL)       NOPASSWD:ALL

In the httpd.conf file I have user=apache and I changed Group=wheel But

Group=wheel

But still I am getting above error, not sure why. When I do exec(whoami) in php file it prints daemon so not sure with which user my php is getting executed. Please help.

I am using LAMPP to run apache server. From a php file I am executing a python script which executes ssh, scp commands. But I am getting error as

sudo: no tty present and no askpass program specified

I looked for this error and as per suggestions I created wheel group in sudoers file as

%wheel ALL=(ALL) NOPASSWD:ALL

In the httpd.conf file I have user=apache and I changed Group=wheel But still I am getting above error, not sure why. When I do exec(whoami) in php file it prints daemon so not sure with which user my php is getting executed. Please help.

I am using LAMPP to run apache server. From a php file I am executing a python script which executes ssh, scp commands. But I am getting error:

sudo: no tty present and no askpass program specified

I looked for this error and as per suggestions I created wheel group in sudoers file as:

%wheel  ALL=(ALL)       NOPASSWD:ALL

In the httpd.conf file I have user=apache and I changed

Group=wheel

But still I am getting above error, not sure why. When I do exec(whoami) in php file it prints daemon so not sure with which user my php is getting executed.

Source Link

Running SSH command from PHP gives sudo: no tty present and no askpass program specified error even though NOPASSWD settings are done

I am using LAMPP to run apache server. From a php file I am executing a python script which executes ssh, scp commands. But I am getting error as

sudo: no tty present and no askpass program specified

I looked for this error and as per suggestions I created wheel group in sudoers file as

%wheel ALL=(ALL) NOPASSWD:ALL

In the httpd.conf file I have user=apache and I changed Group=wheel But still I am getting above error, not sure why. When I do exec(whoami) in php file it prints daemon so not sure with which user my php is getting executed. Please help.