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

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

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 / \

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