This is the mail archive of the
mailing list for the Cygwin project.
Re: cron error can't switch user context
----- Original Message -----
From: "Tom Schutter"
Sent: Friday, April 16, 2010 15:29
|I have attached cronbug.txt as per the cron-config instructions.
| Note that the original cronbug.txt was over 5MB. I edited cronbug.txt and removed 46000 lines
of cronevents output. Is there any way of cleaning out old cron entries from the event log?
| On Fri 2010-04-16 13:42, Tom Schutter wrote:
| > I have number of machines running Windows2003 and Cygwin 1.7.5. On most cron works. But on
one (lemon) it does not. It appears that on lemon cron cannot switch the user context.
| > Cronevents on lemon shows:
| > 2010/04/15 17:19:01 [SYSTEM] /usr/sbin/cron: PID 656: (tschutter) CMD (/usr/bin/python
| > 2010/04/15 17:19:01 [SYSTEM] /usr/sbin/cron: PID 656: (CRON) error (can't switch user
| > /var/log/cron.log is empty on all machines.
| > The cron daemon is running as SYSTEM on all machines.
| > cyglsa is running on all machines.
I should perhaps modify cronbug to use "tail" with cronevents, but it's unusual to see
a report that cron is broken yet there are 46000 lines in the log!
I assume cron used to work, then something happened and it stopped working.
Or there is something special about the tschutter account.
Can you identify the "something" ?
Any difference between the lemon and the others?
It's most likly not a cron problem, but something to do with cyglsa. I have never
used it, don't have a system like yours to test and there is no such previous report.
So not sure what to recommend.
Does password-less ssh work for tschutter ?
If you can't identify the "something", you could try to strace cron on the lemon
and on another machine. Here is the recipe.
Stop the cron service.
Use a simple crontab that runs every minute, for only one user.
Using cygrunsrv, create a new service runing "strace" with argument "cron" under SYSTEM
1) cygrunsrv -I trace_cron -p /usr/bin/strace -a /usr/sbin/cron
2) cygrunsrv -S trace_cron
3) Let this run for no more than 2 minutes, output will be in /var/log/trace_cron.log
You may have to use kill -9 to stop the service (kill the cron pid)
4) Send the trace_cron.log file as an attachment.
5) Remove the trace_cron service
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple