This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: cron cannot change user


----- Original Message ----- 
From: "Mike Schmidt" 
To: cygwin
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:
| <snip> 
| 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
USERDOMAIN=NT AUTHORITY
USERNAME=SYSTEM
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".

Pierre

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]