Running cron jobs as nobody

DAve dave.list at pixelhammer.com
Thu Oct 2 15:12:03 UTC 2008


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!


More information about the freebsd-questions mailing list