Re: cronjob in user environment

2008-09-02 Thread Steve S
On Sep 02 14:18 +0200, Steve S wrote: > Hi all, > > I want to run a cronjob in a user's environment (i.e. as this user and > not as root). > > The script foo.sh to be run by cron on behalf of the a user (johndoe) > needs some env vars (paths) from that user's ~/.bashrc. > > I read about severa

Re: cronjob in user environment

2008-09-02 Thread Michael Mohn
Am 02.09.2008 um 14:42 schrieb michael: On Tue, 2008-09-02 at 14:18 +0200, Steve S wrote: Hi all, I want to run a cronjob in a user's environment (i.e. as this user and not as root). The script foo.sh to be run by cron on behalf of the a user (johndoe) needs some env vars (paths) from tha

Re: cronjob in user environment

2008-09-02 Thread michael
On Tue, 2008-09-02 at 14:18 +0200, Steve S wrote: > Hi all, > > I want to run a cronjob in a user's environment (i.e. as this user and > not as root). > > The script foo.sh to be run by cron on behalf of the a user (johndoe) > needs some env vars (paths) from that user's ~/.bashrc. why not, as

Re: cronjob in user environment

2008-09-02 Thread Tzafrir Cohen
On Tue, Sep 02, 2008 at 02:18:45PM +0200, Steve S wrote: > Hi all, > > I want to run a cronjob in a user's environment (i.e. as this user and > not as root). > > The script foo.sh to be run by cron on behalf of the a user (johndoe) > needs some env vars (paths) from that user's ~/.bashrc. > > I

Re: cronjob in user environment

2008-09-02 Thread Johann Spies
On Tue, Sep 02, 2008 at 02:18:45PM +0200, Steve S wrote: > Hi all, > > I want to run a cronjob in a user's environment (i.e. as this user and > not as root). > > The script foo.sh to be run by cron on behalf of the a user (johndoe) > needs some env vars (paths) from that user's ~/.bashrc. > > I

Re: cronjob in user environment

2008-09-02 Thread Steve S
On Sep 02 14:18 +0200, Steve S wrote: > 2) define env vars in the crontab > > It works if I define the env vars as a full path > > $SOME_VAR=/full/path/1 > $SOME_OTHER_VAR=/full/path/2 > 10 12 * * */2 su -p - johndoe -c /home/johndoe/foo.sh Ups, that must read SOME_VAR=/full

cronjob in user environment

2008-09-02 Thread Steve S
Hi all, I want to run a cronjob in a user's environment (i.e. as this user and not as root). The script foo.sh to be run by cron on behalf of the a user (johndoe) needs some env vars (paths) from that user's ~/.bashrc. I read about several solutions: 1) use su If I try in the crontab 10