This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Unable to get cygwin cron to work
- From: Denis <sysdrk at wowway dot com>
- To: cygwin at cygwin dot com
- Date: Sat, 16 Aug 2014 01:39:18 +0000 (UTC)
- Subject: Unable to get cygwin cron to work
- Authentication-results: sourceware.org; auth=none
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.
Please enter the password for user 'dkertz':
Reenter:
Running cron_diagnose ...
WARNING: You do not currently have a crontab file.
... no problem found.
Do you want to start the cron daemon as a service now? (yes/no) yes
cygrunsrv: Error starting a service: StartService: Win32 error 1069:
The service did not start due to a logon failure.
>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.
------------------------
Next, I decided to try running cron under the password -R option:
First, I ran the /usr/bin/cygserver-config and verified the service was
running using services.msc. Then I ran password -R. The the cron config:
$ cron-config
Cron is already installed as a service under account .\cyg_server.
Do you want to remove or reinstall it? (yes/no) yes
OK. The cron service was removed.
Do you want to install the cron daemon as a service? (yes/no) yes
Enter the value of CYGWIN for the daemon: [ ]
You must decide under what account the cron daemon will run.
Do you want the cron daemon to run as yourself? (yes/no) no
Were the passwords of all cron users saved with "passwd -R", or
are you using the cyglsa package ? (yes/no) yes
The cron daemon will run as SYSTEM.
Running cron_diagnose ...
... no problem found.
Do you want to start the cron daemon as a service now? (yes/no) yes
OK. The cron daemon is now running.
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)
---------------------
Anybody have any suggestions or advice? Could the problem be that corporate
IT has somehow messed up the PC, as the duplicate login in /etc/passwd might
be the case.
Denis
--
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