note 5669 deleted from exec by ronabop

From: Date: Fri, 11 Aug 2000 09:25:41 +0000
Subject: note 5669 deleted from exec by ronabop
Groups: php.notes 
Request: Send a blank email to php-notes+get-1080@lists.php.net to get a copy of this message
hello all. i'm wondering how to execute commands as another user. that is, i protect a page with a login/pass. i get the login/pass ($PHP_AUTH_*), and now, i would like to do: <PRE> exec($PHP_AUTH_USER,$PHP_AUTH_PASS,"$myCommand",$output,$return); </PRE> i've tried <PRE> exec("echo $PASSWD | su $USER -c $command"); </PRE> but su doesn't accept this behavior. any help would be appreciated...

« previous php.notes (#1080) next »