Re: fetchmail, mutt and crontab


Subject: Re: fetchmail, mutt and crontab
From: Jim Cole (greyleaf@yggdrasill.net)
Date: Fri Sep 10 1999 - 02:50:05 MDT


>
> So, questions. A) how can I get cron to get something to fire something
> up once in a session (I really haven't been able to find out) or B) how
> can I get a program specified in rc.local (or even in init.d and linked
> to from rc3.d) to run something as a user, not as root?

Hi.

A) I believe that cron jobs can only be scheduled around times, not events such as system start up.

B) There shouldn't be any problem with running fetchmail as root. You could just kick it off with something
like "/usr/bin/fetchmail -f /home/username/.fetchmailrc" in order to grab the correct configuration. If for
some reason you really do need to run it as a specific non-root user, you could play with the setuid bit. In
this case, you would want to copy the fetchmail binary to the user account, verify that it is indeed owned by
that user, execute something like "chmod 4700 fetchmail", and set up rc.local or whatever to call the modified
version. Even though it will execute with the effective user id of the file owner, I think you would still
need to use the -f option in order to catch the correct config file.

Jim



This archive was generated by hypermail 2a24 : Fri Oct 01 1999 - 16:13:43 MDT