cron adduser - Debian

This is a discussion on cron adduser - Debian ; hi, creating a .php script: called by cron as root, does not create a user. Can anybody tell me a way of search??? thx for idears....

+ Reply to Thread
Results 1 to 4 of 4

Thread: cron adduser

  1. cron adduser

    hi,

    creating a .php script:


    called by cron as root, does not create a user.


    Can anybody tell me a way of search???
    thx for idears.

  2. Re: cron adduser

    On Thu, 23 Aug 2007 16:35:20 +0200,
    SÚverin Richard wrote:

    > creating a .php script:
    >
    > called by cron as root, does not create a user.


    Just a guess here... useradd doesn't want keyboard input, for example,
    for the users initial password, does it? Some programs, especially
    those that want passwords, will fail to run if they're not connected to
    a terminal. There's usually options to provide the necessary
    information more directly.


    Fredderic

  3. Re: cron adduser

    Horton heard a Who named SÚverin Richard saying:
    > hi,
    >
    > creating a .php script:
    >
    >
    > called by cron as root, does not create a user.
    >
    >
    > Can anybody tell me a way of search???


    There may be some log entry stating the problem such as /var/log/daemon.log.
    Could try running it directly from a terminal and see if there's any message.
    Plus, and I'm not certain this is needed, but you could add your user to
    sudousers for that command with the NOPASSWD option. Like this (from my list):
    cmo ALL= NOPASSWD: /usr/sbin/fetchnews

    HTH,
    --
    sk8r-365

    http://goodbye-microsoft.com/

  4. Re: cron adduser

    Fredderic wrote:
    > On Thu, 23 Aug 2007 16:35:20 +0200,
    > SÚverin Richard wrote:
    >
    >
    >>creating a .php script:
    >>
    >>called by cron as root, does not create a user.

    >
    >
    > Just a guess here... useradd doesn't want keyboard input, for example,
    > for the users initial password, does it? Some programs, especially
    > those that want passwords, will fail to run if they're not connected to
    > a terminal. There's usually options to provide the necessary
    > information more directly.
    >
    >
    > Fredderic

    I found the solution in another forum:
    exec( "/usr/sbin/useradd sdfsf");
    works.

    The cron user does not have same $PATH than shell, and realpath have to
    be used.

+ Reply to Thread