Page 1 of 1
shell_exec();
Posted: Wed Aug 31, 2005 2:13 am
by William
Dear All,
I was wondering if it was possible to login to root using "su" or another function using shell_exec() or another way? I am trying to kill a process id that I will need root to do.
-Thanks
Posted: Wed Aug 31, 2005 7:54 am
by feyd
Kamari, you are entirely out of line. Being drunk or high is no excuse.
You now have two choices: straighten out, or leave the forums.
This is an official warning.
Note to others: this thread has been cleaned of retarded posts.
Posted: Wed Aug 31, 2005 8:40 am
by feyd
you may need to upload a shell script to execute for it, preferrably stored outside the document root

But yes, it is possible.
Posted: Wed Aug 31, 2005 10:32 am
by pickle
You may be able to use sudo to do it. You'll have to put your PHP user in the sudousers file though, but then you should be able to do something like this:
where '18876' would be the PID of whatever process you need killed.
Posted: Wed Aug 31, 2005 5:39 pm
by William
Thanks for all your help I will have my friend tell me his method when he gets back. Alot of good ideas thanks

. It really isn't that big of a deal just my friend and I where trying to see who could kick echother out of the server faster. So I made a PHP script to get his PID from his IP Address and kick him. But it wasn't killing the process probably because the user wasn't as high as he was. Thanks
Posted: Wed Aug 31, 2005 5:45 pm
by pickle
He he. Get that PHP script to run whenever he logs in. Can't get much faster than that.
Posted: Wed Aug 31, 2005 5:46 pm
by William
Yeah that would really make him mad... Hmm... Maby making a bash script to do this would be easier but PHP is more fun.