cron cannot change user

Mike Schmidt mike@intello.com
Thu Aug 13 18:10:00 GMT 2009


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:

============== cron-config ============
Cron is already installed as a service under account LocalSystem.
Do you want to remove or reinstall it? (yes/no) 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: [ntsec smbntsec]

The service can run either as yourself or under a privileged account.
Running as yourself allows better access to network drives,
but does not allow to run the crontab of other users.
Do you want to the cron daemon to run as yourself? (yes/no) no


Running cron_diagnose ...
It appears that you do not have an entry for:
    NT AUTHORITY\SYSTEM
in /etc/passwd.

Use the 'mkpasswd' utility to generate an entry for
your User ID in the password file:
    mkpasswd -d -u User_ID >> /etc/passwd.

There may be serious issues with your environment.
You should look into them and run this script again.
Do you want to continue anyway? (yes/no) yes
Do you want to start the cron daemon as a service now? (yes/no) yes
OK. The cron daemon is now running.

In case of problem, examine the log file for cron,
/var/log/cron.log, and the Windows event log (using /usr/bin/cronevents)
for information about the problem cron is having.

Examine also any cron.log file in the HOME directory
(or the file specified in MAILTO) and cron related files in /tmp.

If you cannot fix the problem, then report it to cygwin@cygwin.com.
Please run the script /usr/bin/cronbug and ATTACH its output
(the file cronbug.txt) to your e-mail.

============= end of cron-config ===============

cron-config is particularly opaque - it issues warnings without
explaining what it wants to see.
I don't know what user id it is complaining about - /etc/passwd was
generated automatically as it should, and here it is (partly):
As is the local userid we want cron to run under (impact)

================= extract from /etc/passwd =============================
SYSTEM:*:18:544:,S-1-5-18::
LocalService:*:19:544:U-NT AUTHORITY\LocalService,S-1-5-19::
NetworkService:*:20:544:U-NT AUTHORITY\NetworkService,S-1-5-20::
Administrators:*:544:544:,S-1-5-32-544::
impact:unused_by_nt/2000/xp:1005:513:U-D12989K1\impact,S-1-5-21-388498106-2110954469-2806866164-1005:/home/impact:/bin/bash
================================================================
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.

Mike

> Sent: Thursday, August 13, 2009 10:10 AM
>
>
> |I am running cygwin 1.5.25-15 on a number of sites, most of the Windows
> | XP. I have at least one occasion where I have two identical systems
> | side-by-side, configured the same way (same logons, etc). Both systems
> | run cron as a service installed via cygrunsrv, using the local system
> | account.
>
> 1) did you use cron-config to start the cron daemon?
> 2) are there network drives involved and are they the same on the two systems?
> 3) do you see cron related files in /tmp?
> 4) run cronbug and send the file cronbug.txt as an attachment
>
> 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
>   

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: cronbug.txt
URL: <http://cygwin.com/pipermail/cygwin/attachments/20090813/34b87892/attachment.txt>
-------------- next part --------------
--
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


More information about the Cygwin mailing list