Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > Web Development
You last visited: Today at 03:48

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[PHP] shell_exec: sudo: no tty present and no askpass program specified

Discussion on [PHP] shell_exec: sudo: no tty present and no askpass program specified within the Web Development forum part of the Coders Den category.

Reply
 
Old   #1
 
Coniesan's Avatar
 
elite*gold: 1000
Join Date: Mar 2009
Posts: 1,408
Received Thanks: 1,006
[PHP] shell_exec: sudo: no tty present and no askpass program specified

Hey @ all, ich komm gleich mal zur Sache

1. ich möchte, dass mein Script eine shell/batch File executed
2. ich benutze: Linux Debian 6 | Apache2.4 | PHP 5.4.17
3. mein Command
PHP Code:
$execute_shell=shell_exec('sudo sh /home/usr/scripts/apache.sh 2>&1');
echo 
$execute_shell
4. Fehlercode:
Code:
no tty present and no askpass program specified
5. sudoers:
Code:
Defaults !requiretty
www-data ALL=(ALL:ALL) NOPASSWD: /home/usr/scripts/apache.sh
(ja ich hab schon mit whoiam gecheckt, dass es www-data ist!)


Wär echt chillig, wenn mir jemand helfen könnte, oder einer ne Idee hat, woran das Ganze liegen kann!

Kind regards
Coniesan is offline  
Old 10/19/2013, 16:10   #2

 
elite*gold: 128
Join Date: Jan 2011
Posts: 688
Received Thanks: 95
hey,
Hast du es mal so probiert?

PHP Code:
shell_exec('ssh -t HOST sudo sh /home/usr/scripts/apache.sh 2>&1'); 
Luxxus² is offline  
Old 10/19/2013, 16:20   #3
 
Coniesan's Avatar
 
elite*gold: 1000
Join Date: Mar 2009
Posts: 1,408
Received Thanks: 1,006
Hey, erstmal thx für die Antwort, jetzt kommt aber diese Meldung....:
Code:
Pseudo-terminal will not be allocated because stdin is not a terminal. ssh: connect to host luki4fun port 22: Connection timed out
Coniesan is offline  
Old 10/19/2013, 16:23   #4

 
elite*gold: 128
Join Date: Jan 2011
Posts: 688
Received Thanks: 95
Ups, so war das nicht gemeint :P
Versuch mal so:

PHP Code:
shell_exec('ssh -t localhost sudo sh /home/usr/scripts/apache.sh 2>&1'); 
Luxxus² is offline  
Reply


Similar Threads Similar Threads
CP in Present CO
12/24/2012 - Conquer Online 2 - 6 Replies
So I left just after the DBs got removed from the DB promo, just wondering if there is any way to make a decent enough amount of CP either using bots or any other methods in game? Or have TQ completely erased any way of making CP without buying it? Also which bot is the most stable these days? In terms of bans and DCs
present for all x64
11/25/2011 - Archlord - 2 Replies
have fun with my bot .. its still working _GDIPlus_Startup() Dim $STOP = True HotKeySet("{F10}", "START1") HotKeySet("{F11}", "STOP1") GUICreate("3000 zeilen bot", 250, 300) Opt("GUIOnEventMode", 1) GUICtrlCreateButton("load", 170, 10) GUICtrlCreateButton("load", 200, 10)
CR 1.0.4 up to the present
07/07/2008 - Cabal Hacks, Bots, Cheats, Exploits & Macros - 6 Replies
guy's i've been reading a lot of topics here in the forums that is really repetetive, even when some of them have already been answered... if some you guys are still having difficulties trying to run the newest version of Cabal Riders maybe here are some quick solutions... 1. if you have anti-virus installed whatever the heck it is, disable it, cuz it's messing with the 1.0.4 version of CR... 2. for PC's with DeepFreeze programs installed, disable it as well, in order for the 1.0.5 and...



All times are GMT +1. The time now is 03:48.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.