On Tue, 2010-07-13 at 12:56 -0600, Nathan Nobbe wrote:

> On Sat, Jul 10, 2010 at 2:39 PM, Matt M. <cmorrow...@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


Reply via email to