[OpenIndiana-discuss] Cron best practice

Jan Owoc jsowoc at gmail.com
Mon May 14 19:48:34 UTC 2012


On Mon, May 14, 2012 at 1:42 PM, Mark Creamer <whitetr6 at gmail.com> wrote:
> I'm looking for a bit of best practice advice. On Windows systems I
> usually create a job runner account with the correct permissions to
> run batch scripts when they need to be scheduled, so the jobs aren't
> tied to specific users whose passwords will change.
>
> So in OI, I have a similar need, to run a job nightly that will pull
> data from a neighboring server using a scp command run in a cron job.
> My thought is to create a user account and set up passwordless scp to
> facilitate scripting the scp task. Would it then be best to run the
> job in root's cron? Or from the shell of the user running the scp?

I would imagine that you should be running any script with the minimum
permissions needed for it to function. If all you need to do is copy
files from a remote server to the local filesystem, you should be able
to do that with a regular user account.

I would only run such a script as the root if I anticipate problems
with permissions (eg. other users making conflicting changes to the
target folder and I need to overwrite them).


On Mon, May 14, 2012 at 1:46 PM, Bryan Iotti <ironsides.medvet at gmail.com> wrote:
> Very good question, curious myself
>
> Could it be run as user "nobody"?

The user could be called "mybackup" with the shell set to
"/bin/false", if you want to prevent logon as that user.


Jan



More information about the OpenIndiana-discuss mailing list