X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: Yes, hits=5.5 required=5.0 	tests=AWL,BAYES_50,BOTNET,J_CHICKENPOX_102,SPF_NEUTRAL
X-Spam-Check-By: sourceware.org
Message-id: <03d401ca1c5e$575df780$570410ac@wirelessworld.airvananet.com>
From: "Pierre A. Humblet" <Pierre.Humblet@ieee.org>
To: "Mike Schmidt" <mike@intello.com>, <cygwin@cygwin.com>
References: <4A841EBE.3080203@intello.com>  <034901ca1c24$72b36400$570410ac@wirelessworld.airvananet.com>  <4A8456E2.1070602@intello.com>
Subject: Re: cron cannot change user
Date: Thu, 13 Aug 2009 17:38:03 -0400
MIME-version: 1.0
Content-type: text/plain; charset=iso-8859-1
Content-transfer-encoding: 7bit
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com


----- 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

