This is the mail archive of the
cygwin
mailing list for the Cygwin project.
RE: Unable to get cygwin cron to work
- From: "Pierre A. Humblet" <Pierre dot Humblet at alum dot mit dot edu>
- To: "'Denis'" <sysdrk at wowway dot com>, <cygwin at cygwin dot com>
- Date: Mon, 18 Aug 2014 09:23:23 -0400
- Subject: RE: Unable to get cygwin cron to work
- Authentication-results: sourceware.org; auth=none
- References: <loom dot 20140816T030401-212 at post dot gmane dot org>
> -----Original Message-----
> From: cygwin-owne at cygwin.com on Behalf Of Denis
> Sent: Friday, August 15, 2014 21:39
>
> I'm trying unsuccesfully to get cron to work under 64-bit cywin under Win7
> Pro. First, I tried running as myself (running cygwin with system
> administrator privilege):
>
> $ cron-config
> Do you want to install the cron daemon as a service? (yes/no) yes Enter
the
> value of CYGWIN for the daemon: [ ]
>
> Do you want the cron daemon to run as yourself? (yes/no) yes
>
> WARNING: User dkertz appears 2 times in /etc/passwd.
> This may confuse the system
> Edit /etc/passwd and assign unique user ids.
>
<snip>
> From the above you can see the warning about my login appearing twice in
> /etc/passwd:
>
> $ grep dkertz /etc/passwd
> dkertz:unused:1003:513:dkertz,U-USNAVN0D011H46\dkertz,
> S-1-5-21-2470246883-414681431-158823764-1003:/home/dkertz:/bin/bash
> dkertz:unused:295587:10513:U-NA02\dkertz,
> S-1-5-21-2112754840-354624142-596004286-
> 285587:/home/dkertz:/bin/bash
>
> USNAVN0D011H46 is the PC machine name and NA02 is the domain set up by
> corporate IT. Does this suggest IT has messed up? I log into the PC
using the
> na02\dkertz login.
>
> Thinking this login duplication might be the problem, I changed
/etc/passwd
> to contain only the first login and then only the second login with the
same
> results - logon failure when running cron-config.
>
<snip>
>
> Now the cron runs but a scheduled cron job doesn't run and this is what
the
> cronevents shows:
>
> 2014/08/15 19:41:01 [SYSTEM] /usr/sbin/cron: PID 4692: (dkertz) WRONG
> FILE OWNER (tabs/dkertz)
>
There is no doubt that your problems are caused by the duplicate entry.
There is no enough info to explain everything but note that according to
http://cygwin.com/ml/cygwin/2014-02/msg00306.html
when an entry can't be found in /etc/passwd it is now autogenerated.
So I suggest that you try the following to sort things out better:
- restore the original /etc/passwd with the 2 dkertz
- manually edit /etc/passwd and rename one of them, for example one of them
to NA02_dkertz
- if you have renamed the dkertz you have login with, log out of Cygwin and
start a new shell
- make sure the crontab in /var/cron/tabs/ has the name of and is owned by
the dkertz you want, and is readable by administrators
- try starting cron again. If starting as yourself, make sure you are the
one who owns the crontab.
Sorry I can't help more, but I don' have a 64 bit system nor easy access to
a domain account and I have not kept track with the way Cygwin maps user
names.
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