Re: exec command
| From: | Gal | Date: | Wed, 01 Oct 2003 14:05:19 +0000 |
| Subject: | Re: exec command | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-164546@lists.php.net to get a copy of this message | ||
How do you run this ? Which user ?
if its done via Apache - you can't run useradd with the apache user name.
if you run it from command line make sure you are root.
Nabil wrote:
hi all; I want to execute #useradd -d /home/all -g wahtever -s /bin/bash newuser how can I do it ... I used exec and shell_exec and system I tried all the following but with no hope exec('useradd -d /home/all -g wahtever -s /bin/bash newuser') or die ('not done'); exec('/usr/sbin/useradd -d /home/all -g wahtever -s /bin/bash newuser') or die ('not done'); shell_exec('useradd -d /home/all -g wahtever -s /bin/bash newuser') or die ('not done');