in reply to Re: Script run as a Cron Job
in thread Script run as a Cron Job

would that work? wouldn't that mean that the myperlscript was being run by webd, which means that it would not have sufficinet rights to run the adduser command?

Replies are listed 'Best First'.
Re: Script run as a Cron Job
by Abigail-II (Bishop) on Aug 23, 2002 at 14:56 UTC
    Well, you can always make myperlscript suid, or use a setuid wrapper (in fact, you are now using cron to give you this wrapper).

    Otherwise, you could log the new usernames/passwords in a file or database and create a new program that is called from cron. The task of this program is to read the entries, call myperlscript and delete the entries from the file or database. If you use a file, make sure you properly flock it when modifying it.

    Abigail

      Uhm, if you have permission to run the adduser command, you really should know all of this.

      Look up the 'chmod' command.

      Abigail

      how would i go about suid'ing the script? i'm a bit new to all of this and most of what you just said went 'whooosh - straight over my head!'