www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/08/13/17:41:46

X-Recipient: archive-cygwin AT delorie DOT 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 DOT Humblet AT ieee DOT org>
To: "Mike Schmidt" <mike AT intello DOT com>, <cygwin AT cygwin DOT com>
References: <4A841EBE DOT 3080203 AT intello DOT com> <034901ca1c24$72b36400$570410ac AT wirelessworld DOT airvananet DOT com> <4A8456E2 DOT 1070602 AT intello DOT com>
Subject: Re: cron cannot change user
Date: Thu, 13 Aug 2009 17:38:03 -0400
MIME-version: 1.0
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT 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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019