Re: [PHP] apache user cannot execute useradd via sudo :(

2009-05-22 Thread Michael A. Peters
vuthecuong wrote: Yeah I know my script don't care at all about security. I'm keeping it fot the sake of simplicity. After making it 'work', I will take a look seriously about security. So, why it not create user for me? thanks and regards I'm not that familiar with sudo, but I suspect it m

Re: [PHP] apache user cannot execute useradd via sudo :(

2009-05-22 Thread vuthecuong
Michael A. Peters wrote: > > vuthecuong wrote: >> >> Hi all >> My server is centos 5.1 with php 5.1.6. >> In my app I want apache to add user through sudo. >> >> My sudoers file is: >> %apache ALL=(ALL) NOPASSWD: ALL >> %tony ALL=(ALL) NOPASSWD: ALL >> >> My test.php í: >> > $username="hixhi

Re: [PHP] apache user cannot execute useradd via sudo :(

2009-05-22 Thread Ashley Sheridan
On Fri, 2009-05-22 at 05:01 -0700, Michael A. Peters wrote: > Make damn sure you validate the $username variable whatever solution > you > end up using. Yeah, I have a funny story along those lines. I was doing the same sort of thing, but allowing it to change passwords for a user. Luckily it wa

Re: [PHP] apache user cannot execute useradd via sudo :(

2009-05-22 Thread Michael A. Peters
vuthecuong wrote: Hi all My server is centos 5.1 with php 5.1.6. In my app I want apache to add user through sudo. My sudoers file is: %apache ALL=(ALL) NOPASSWD: ALL %tony ALL=(ALL) NOPASSWD: ALL My test.php í: That's not a very secure sudoers file. But you probably don't want to use sudo

[PHP] apache user cannot execute useradd via sudo :(

2009-05-22 Thread vuthecuong
Hi all My server is centos 5.1 with php 5.1.6. In my app I want apache to add user through sudo. My sudoers file is: %apache ALL=(ALL) NOPASSWD: ALL %tony ALL=(ALL) NOPASSWD: ALL My test.php í: http://www.nabble.com/apache-user-cannot-execute-useradd-via-sudo-%3A%28-tp23668764p23668764.html Sen

Re: [PHP] Apache user can't use exec(), passthru(), etc.

2005-03-23 Thread Jim Poserina
Wed 23 Mar 2005--23:05:30--/home/webuser>whoami root Wed 23 Mar 2005--23:05:33--/home/webuser>cat test.php Wed 23 Mar 2005--23:05:36--/home/webuser>php test.php Content-type: text/html X-Powered-By: PHP/4.3.9 root Wed 23 Mar 2005--23:05:39--/home/webuser>su webuser [EMAIL PROTECTED] ~]$ php test.

Re: [PHP] Apache user can't use exec(), passthru(), etc.

2005-03-23 Thread Jim Poserina
The output is: OS Error: 127. I have a second server that I use as a downtime backup. On that one, all the scripts work normally. I don't have to give a path for the commands, any commands with permission problems return "permission denied," and the apache user (nobody) actually has /sbin/nologi

Re: [PHP] Apache user can't use exec(), passthru(), etc.

2005-03-22 Thread Richard Lynch
On Mon, March 21, 2005 8:20 pm, Jim Poserina said: > If I run this PHP script: > echo ''; > echo exec('whoami'); The first most biggest thing wrong is that you aren't using the additional arguments to exec() to find out what your output is, and if your command generated an error. For starters, I

[PHP] Apache user can't use exec(), passthru(), etc.

2005-03-21 Thread Jim Poserina
If I run this PHP script: '; echo exec('whoami'); echo ''; ?> from the web, the output is and from the command line running as the apache user(webuser), the output is. Content-type: text/html X-Powered-By: PHP/4.3.9 But if I run from the command line as root, the output is: Content-type: text/h

[PHP] apache user authentification problems

2002-11-20 Thread Duncan
Hi, i wrote a php script, which shows a "printer-friendly" version of the current website. However, since the php safe_mode is turned to "on", i had to make use of a workaround to be able to display all users files with this script. Instead of accessing it via files, i use a fsockopen() connecti

Re: [PHP] Apache User Groups?

2001-11-10 Thread Chris Hobbs
http://www.apache.org/foundation/mailinglists.html Eric wrote: > Does anyone know of a usergroup for Apache? I am having difficulties > finding one and am having some troubles with Apache. > > > Thanks > Eric > > -- ___ ____ _ Chris Hobbs / \

[PHP] Apache User Groups?

2001-11-10 Thread Eric
Does anyone know of a usergroup for Apache? I am having difficulties finding one and am having some troubles with Apache. Thanks Eric -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the li

Re: [PHP] Apache user

2001-04-05 Thread Joe Conway
ED]> Sent: Thursday, April 05, 2001 11:32 AM Subject: RE: [PHP] Apache user > Put the call to "whoami" in a call to exec() from inside a PHP script. > > echo exec("whoami"); > ?> > > Kirk > > > -Original Message- > > From: Joe Con

RE: [PHP] Apache user

2001-04-05 Thread Johnson, Kirk
Put the call to "whoami" in a call to exec() from inside a PHP script. Kirk > -Original Message- > From: Joe Conway [mailto:[EMAIL PROTECTED]] > Sent: Thursday, April 05, 2001 12:26 PM > To: Chris Mason; PHP User Group > Subject: Re: [PHP] Apache user > &

Re: [PHP] Apache user

2001-04-05 Thread Joe Conway
> Can anyone tell me how to get the user apache is running as from php? > If you're on Linux/Unix, try: echo `whoami`; Hope this helps, Joe -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To conta

[PHP] Apache user

2001-04-05 Thread Chris Mason
Can anyone tell me how to get the user apache is running as from php? Chris Mason Box 340, The Valley, Anguilla, British West Indies Tel: 264 497 5670 Fax: 264 497 8463 USA Fax (561) 382-7771 Take a virtual tour of the island http://net.ai/ The Anguilla Guide Find out more about NetConcepts www.n