On Aug 23, 4:28 pm, Séverin Richard <severin.rich... RemoveThis @free.fr> wrote:
> Hi,
>
> creating a .php containing
> <? exec( "useradd myuser" ) ?>
>
> and called by cron as root does not create a user.
>
> What can i change to make it work??
>
> thx for idears.
Instead of creating system users dynamically that way, I would :
1- replace your php file with an other one that simply writes the
username I want to create in a temporary text file thata remotely
called php script can access ..
2- add a cron that periodically runs a shell script as root that,
checks wheter the temporary file contain some users to add, add users
if ever there are users to add and empty the file/comment the line
containing the user that's bee already added ..
This seems to me much more clean than using php exec() ...
>> Stay informed about: cron adduser