[PHP] Re: Execute command line as a different user

2008-07-01 Thread Jon Drukman
Matt Palermo wrote: I'm using the following command and I'm not getting any feedback: exec("echo 'adminPass' | sudo -u adminAccount -S whoami", $f, $r); Both $f and $r don't contain any data. This leads me to believe that the command is not being run for whatever reason. Is there something

[PHP] Re: Execute command line as a different user

2008-07-01 Thread Matt Palermo
I'm using the following command and I'm not getting any feedback: exec("echo 'adminPass' | sudo -u adminAccount -S whoami", $f, $r); Both $f and $r don't contain any data. This leads me to believe that the command is not being run for whatever reason. Is there something wrong with this comma

[PHP] Re: Execute command line as a different user

2008-07-01 Thread Shawn McKenzie
Shawn McKenzie wrote: Matt palermo wrote: My PHP is running as a user with limited rights. I'd like to execute a command line as a different user. I'm trying to delete a file and the PHP user doesn't have access to do this. I know the username and password for the admin user that has rights

[PHP] Re: Execute command line as a different user

2008-07-01 Thread Matt Palermo
Okay, I'll have to look into that. I have very limited knowledge with shell scripts. You wouldn't have an example of one that can do what I need do you? Thanks, Matt "Shawn McKenzie" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Matt palermo wrote: My PHP is running as a us

[PHP] Re: Execute command line as a different user

2008-07-01 Thread Shawn McKenzie
Matt palermo wrote: My PHP is running as a user with limited rights. I'd like to execute a command line as a different user. I'm trying to delete a file and the PHP user doesn't have access to do this. I know the username and password for the admin user that has rights to delete a file. Is