• Howdy! Welcome to our community of more than 130.000 members devoted to web hosting. This is a great place to get special offers from web hosts and post your own requests or ads. To start posting sign up here. Cheers! /Peo, FreeWebSpace.net
managed wordpress hosting

Security - Firing off commands as root from the web?


Active Member
I would like to know how secure the follow procedure to execute a command as root would be, and if any mods could be made to better it, or if a better procedure to do this exists?:

  • Connect to an SSL enabled website which requires login authentication against an SQL database.
  • Input and store root password in PHP session information. (some form of encoding)
  • When command is required to be run by the logged in user, the root password is passed to shellscript on the server.
  • The shellscript fires off the command using sudo.

Yes, I am aware running root commands from anything other than the console is insecure. How secure would this method be if it wasn't stored in the session information?