su idn't working from within php
| From: | Nitin Mehta | Date: | Tue, 27 Jan 2004 08:49:11 +0000 |
| Subject: | su idn't working from within php | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-175872@lists.php.net to get a copy of this message | ||
hi all
i was trying to execute some commands as an authorized user from within my php script with
exec ("su <username> -c \"sudo <command>\" 2>&1;", $output);
but it gives me
standard in must be a tty
how can i make it work? it runs perfectly at command prompt
I even tried to ssh, but the problem is where should i copy the rsa-key generated with keygen, as
the scripts are run as apache/http user..........
Plz help me out of this
Thanx in advance
Nitin