Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

On Ubuntu 12.04 how can I configure cron to log to a particular file when it runs jobs as a particular user? I am interested in redirecting both the messages that go into auth.log and those going into syslog.

share|improve this question
In this case you actually need to configure your logging daemon, not cron. Cron just sends it's messages to syslog, and then your log daemon determines what file to go into. You can configure your log daemon to extract the user from the message and change the destination based on the user. – Patrick Apr 3 '13 at 19:57

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.