"Nabil" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> so when i use php exec to do it , am i using apache user (nobody) or
am i
> using php user , is there a php  user ?
> so what can i do ?
> i want to execute
> #useradd -d /home/all -g wahtever -s /bin/false newuser
> as i want to create only pop user on the system when my user make
> regestration.. to give him an email account
>
> any comment ?

Question to your answer has already been given.
Review the thread and you will see it.

But to answer your question (again):
You are running as the user the Apache daemon got started.
Apache handles the request and recognizes that it has to
hand the request to PHP.

Still you will have to check the stuff entered before
executing!!!
See the posts by Javier Tacon!!

And to get it work, you must get the command executed as
root. This may be achieved by using sudo (please lookup
the man pages or internet for help on that!).

Just one comment at last:
Don't let Apache run as root! That would make it all worse
than using sudo for your script, because Apache could
execute critical code killing your system when running
as root. One who is in practice could hack your system
within seconds.
Apache always MUST run as a non-privileged user!


HTH.

--
 Dennis Sterzenbach
 www.darknoise.de

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to