Re: adduser & php

From: Date: Tue, 13 Jul 2010 19:51:39 +0000
Subject: Re: adduser & php
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-306878@lists.php.net to get a copy of this message
On Tue, 2010-07-13 at 12:56 -0600, Nathan Nobbe wrote: > On Sat, Jul 10, 2010 at 2:39 PM, Matt M. <cmorrow132@gmail.com> wrote: > > > The only thing is, when I execute this command from a shell, it works. > > Obviously I'm replacing $username and $password with something valid when > > doing this manually. > > > > It's like the script clears the $username variable just before it executes > > the command, or because the variable is inside quotes, it is not getting > > through. > > > > likely the user the webserver is running as does not have sudo privileges; > youll have to properly configure sudo so that the webserver user only has > access to run the useradd and w/e other superuser required commands you > intend to run from it. > > -nathan Not to mention that you have to santise the input anyway to ensure that you're not changing the details for an already existing user, especially a system user. Thanks, Ash http://www.ashleysheridan.co.uk

« previous php.general (#306878) next »