Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com From: Erik Bak-Mikkelsen Message-Id: <200107111907.TAA05247@mdve.oss.dk> Subject: Re: error starting cron on nt4 To: cygwin AT cygwin DOT com (Corinna Vinschen) Date: Wed, 11 Jul 101 19:07:53 +0000 (GMT) In-Reply-To: <20010711165423.A29127@cygbert.vinschen.de> from "Corinna Vinschen" at Jul 11, 1 04:54:23 pm X-Mailer: ELM [version 2.4 PL25] Content-Type: text > > On Wed, Jul 11, 2001 at 04:08:54PM +0000, Erik Bak-Mikkelsen wrote: > > > cygrunsrv -I cron -p /usr/sbin/cron -a -D -e "CYGWIN=" > > > > > Great, and thanks, this solved the install and run problem of the cron daemon. > > Now the service is installed under the SYSTEM account. > > However, my crontab under another userid > > */1 * * * * /cygdrive/mydrive/notepad.exe > > gives an error in the EventLog saying > > The description for Event ID ( 0 ) in Source ( /USR/SBIN/CRON ) > > could not be found. It contains the following insertion string(s): > > /USR/SBIN/CRON : Win32 Process Id = 0x162 : Cygwin Process > > Id = 0x162 : (CRON) error (can't switch user context). > > It's very likely that your /etc/passwd isn't setup correctly. > All users must be setup correctly in /etc/passwd. Use mkpasswd > to generate correct /etc/passwd entries. I did an mkpasswd -l >/etc/passwd mkpasswd -g >/etc/group But I have found some postings and informations on necessary manual edit afterwards? Is that necessary at all? The group membership "None" is fine with me. > > Also you should use ntsec since that is recommended (and required > in future releases of Cygwin) to switch user context without password > as cron does. Please, could You elaborate on using ntsec? The only configuratioon I have made is CYGWIN=ntsec But is that sufficeient? At least, now it seems that cron is executing each minut as I expect but still it gives the ... Id = 0x162 : (CRON) error (can't switch user context). errors in the EventLog. What could be causing this remembering my simple ntsec setting? > > > Now, I think I have read something about running cron under diiferent users but I can't figure out what it was. Maybe a limitation in NT? > > Don't start cron other than under SYSTEM account using uid 18. > Switching user context needs various user rights only given to > SYSTEM by default. If you won't do that you'll have to rebuild > cron using other values. Fair. I didn't express my self clearly. Sure I run the cron daemon under SYSTEM. But what I meant was that my crontab belongs to another user. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/