I am trying to write some code which needs to use exec() and popen() and maybe passthru().
Trouble is the user it tries to execute the commands with doesn't have rights to do what I want to do.
Can anyone tell me how to change the user? I know the username and password for the account I want to use.
I have tried
$process1=popen("su username", $output);
fwrite($process1, password);
pclose($process1);
but it doesn't see to have any effect.
(obviously I have not printed the username and password I am using but it is correct in my code..)