On Wednesday 20 June 2007, Nick wrote:
> Hi there,
>
> I'm planning to set my mother up with a very simple gentoo box, with
> only what she needs etc.
>
> Ideally it should require almost no interaction from me, and just
> keep itself working and secure.
>
> So, I'm planning to run "sudo emerge --sync" and "sudo glsa-check -f
> new" from a cron job, perhaps once a week.
>
> I can set up the sudoers part all fine, but is there anything I
> should watch out for / consider when running these maintenance tools
> from a cron job?

Why bother with sudo and /etc/sudoers? That's just an extra layer of 
unnecessary complexity. The usual assortment of cron daemons can all 
run commands as root. Write a script to run the commands you want, copy 
it to /etc/cron.d/weekly. It will run at 4:22 am every Sunday.

Log in as root, crontab -e also works. As does sudo crontab -e

You'll have to be aware of the usuaal limitations of cron jobs - they do 
not run under bash, and they seldom have the same environment variables 
set as what a r\egular user gets. So always include full paths to any 
command you run

alan


-- 
Optimists say the glass is half full,
Pessimists say the glass is half empty,
Developers say wtf is the glass twice as big as it needs to be?

Alan McKinnon
alan at linuxholdings dot co dot za
+27 82, double three seven, one nine three five
-- 
[EMAIL PROTECTED] mailing list

Reply via email to