This is the mail archive of the
mailing list for the Cygwin project.
Re: cron cannot change user
----- Original Message -----
From: "Mike Schmidt"
Sent: Thursday, August 13, 2009 2:09 PM
| On all the systems where cron works I did NOT run cron-config. I used
| the following line to install cron:
| cygrunsrv --install cron --path=/usr/sbin/cron --desc='Cygwin cron
| service' --type=auto --neverexits -a '-n'
| It has always worked for me.
| Nothing cron-related in /tmp
| When it stopped working on 1 system, I ran cron-config on that system.
| Here is the result:
| Running cron_diagnose ...
| It appears that you do not have an entry for:
| NT AUTHORITY\SYSTEM
| in /etc/passwd.
OK, that happens because your environment has
and that confuses cron-config (it's trying to check you have a passwd entry)
I suspect that you are logged in under ssh or some such.
It's a Cygwin issue with a long history, but it's not something to worry about for cron.
I will fix that test.
| attached is the cronbug.txt
| Note that if I run cron-config on any of the systems that work perfectly
| fine, I get the same warnings about the account and the environment, but
| when I restore the service with the cygrunserv command above, it works
| fine. Only this 1 system refuses. They use the same userids and
| configuration as far as I can tell.
What do you mean by "refuses"?
As far as I can see from the log, cron does change to the "impact" user and the command runs.
What led you to the "Subject:" of your e-mail?
What's happening to all the echo `date` > /tmp/date you have been running recently ?
It's kind of weird they don't run every minute.
I also see some MAIL (mailed 56 bytes of output but got status 0x0001)
That would happen if /tmp is not writable. Any reason that would be the case ?
Just to be sure, please edit /bin/cronlog and change all "exit 1" to "exit 123".
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple