Re: adduser & php

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

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



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux