Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 02 Oct 2008 11:11:52 -0400
From:      DAve <dave.list@pixelhammer.com>
To:        'User Questions' <freebsd-questions@freebsd.org>
Subject:   Running cron jobs as nobody
Message-ID:  <48E4E4B8.90202@pixelhammer.com>

next in thread | raw e-mail | index | archive | help
Good morning all,

We have a cronjob we need to run as nobody from /etc/crontab and it 
seems to be not working. The job runs, but not as user nobody.

I noticed two things,

1) the job to update the locate DB runs as nobody, because the script 
uses su to become nobody.
echo /usr/libexec/locate.updatedb | nice -5 su -fm nobody || rc=3

2) nobody, as expected, has no shell or home dir in /etc/password.

I searched around for an answer but didn't see anything concerning this 
other than a patch to cron to check if setuid fails.

Is setting the user to nobody in /etc/crontab not possible?

Thanks,

DAve

-- 
Don't tell me I'm driving the cart!



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?48E4E4B8.90202>