Re: Execute Shell command?

From: Date: Mon, 02 Apr 2001 04:42:40 +0000
Subject: Re: Execute Shell command?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-46556@lists.php.net to get a copy of this message
I use a package called sudo which allows you to give limited root rights to the user that your webserver is running as. Using this I'm able to add/delete a user from a PHP script and also change passwords using poppassd. http://www.courtesan.com/sudo/ Chris KPortsmout@aol.com wrote: > Hi, > > Does anyone know if there is a way to execute a shell command in a php > script? I am trying to execute the following: > > /usr/sbin/cadduser -d www.domain.com -f Adrian -u testing -p testing -q 10 -w > kportsmout@aol.com > > I have tried passthru(), system(), exec() and none seem to work. I also tried > the backtick and that never worked. Any ideas anyone? > > Adrian > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net -- Chris Fry Quillsoft Pty Ltd Specialists in Secure Internet Services and E-Commerce Solutions 10 Gray Street Kogarah NSW 2217 Australia Phone: +61 2 9553 1691 Fax: +61 2 9553 1692 Mobile: 0419 414 323 eMail: chris@quillsoft.com.au http://www.quillsoft.com.au You can download our Public CA Certificate from:- https://ca.secureanywhere.com/htdocs/cacert.crt ********************************************************************** This information contains confidential information intended only for the use of the authorised recipient. If you are not an authorised recipient of this e-mail, please contact Quillsoft Pty Ltd by return e-mail. In this case, you should not read, print, re-transmit, store or act in reliance on this e-mail or any attachments, and should destroy all copies of them. This e-mail and any attachments may also contain copyright material belonging to Quillsoft Pty Ltd. The views expressed in this e-mail or attachments are the views of the author and not the views of Quillsoft Pty Ltd. You should only deal with the material contained in this e-mail if you are authorised to do so. This notice should not be removed.

« previous php.general (#46556) next »