kill users processes in linux with php
问题 I am trying to write a php script to kill users in a redhat machine. I know it is possible (and very insecure) to give apache the ability to do things as root, but I need to be able to kill any user from a web page, does anyone have any good working scripts or point me to a place to find some more info? I can use this code (which I took from php.net) to make it work, but I assume that this will work only if I give apache root permission or run apache as root. <?php exec("kill -9 $pid"); ?>