Adam Funk
2014-05-20 11:53:38 UTC
What are the practical differences between the following two ways of
running a job (launched by root from a cron or at job)? I think I've
seen both variations in scripts supplied with packages.
sudo -u news /usr/local/sbin/fetchnews -f 2>/dev/null
su news -c "/usr/local/sbin/fetchnews -f 2>/dev/null"
(I've tried googling for it, but all I find are explanations of the
main differences between sudo & su, not dealing with su -c.)
Thanks,
Adam
running a job (launched by root from a cron or at job)? I think I've
seen both variations in scripts supplied with packages.
sudo -u news /usr/local/sbin/fetchnews -f 2>/dev/null
su news -c "/usr/local/sbin/fetchnews -f 2>/dev/null"
(I've tried googling for it, but all I find are explanations of the
main differences between sudo & su, not dealing with su -c.)
Thanks,
Adam
--
You measure democracy by the freedom it gives its dissidents, not the
freedom it gives its assimilated conformists. --- Abbie Hoffman
You measure democracy by the freedom it gives its dissidents, not the
freedom it gives its assimilated conformists. --- Abbie Hoffman