From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from omta001.cacentral1.a.cloudfilter.net (omta001.cacentral1.a.cloudfilter.net [3.97.99.32]) by sourceware.org (Postfix) with ESMTPS id E40ED3985830 for ; Tue, 20 Jul 2021 06:53:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E40ED3985830 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=SystematicSw.ab.ca Authentication-Results: sourceware.org; spf=none smtp.mailfrom=systematicsw.ab.ca Received: from shw-obgw-4003a.ext.cloudfilter.net ([10.228.9.183]) by cmsmtp with ESMTP id 5YKRmLu0WFRDp5jcxmNZ0u; Tue, 20 Jul 2021 06:53:15 +0000 Received: from [192.168.1.104] ([68.147.0.90]) by cmsmtp with ESMTP id 5jcvmJObWqevi5jcwmDqfv; Tue, 20 Jul 2021 06:53:14 +0000 X-Authority-Analysis: v=2.4 cv=B4F8bMhM c=1 sm=1 tr=0 ts=60f672da a=T+ovY1NZ+FAi/xYICV7Bgg==:117 a=T+ovY1NZ+FAi/xYICV7Bgg==:17 a=IkcTkHD0fZMA:10 a=w_pzkKWiAAAA:8 a=94nOnFI1EgyDtX4ev68A:9 a=QEXdDO2ut3YA:10 a=OO2XiV6ZNdAA:10 a=sRI3_1zDfAgwuvI8zelB:22 Reply-To: cygwin@cygwin.com To: cygwin@cygwin.com References: From: Brian Inglis Organization: Systematic Software Cc: Jeremy Hetzler , jhetzler@chabaso.com Subject: Re: cron problem -- can't switch user context Message-ID: <34b44dbc-8522-4af8-f973-4c401a7e4ed3@SystematicSw.ab.ca> Date: Tue, 20 Jul 2021 00:53:12 -0600 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-CA Content-Transfer-Encoding: 8bit X-CMAE-Envelope: MS4xfLM6pxQdykE4ePZyHGadE0We6Y5zV0J4WispZb2D2+7013531IOXCdeofp1YY+JRES0/38m2TNIqk2RU/VxSfiIil6es7paDequYrWzD0BwrEqrLPpTE tQw0QuKp5zvR7S7ktOW+pVMNzWSqX8NyF8/Naxh7w4eqo7lfTv2gz2gmPrZgyhGoyB9hyJoarOHPQ6V4Qm7JMBc3OtBYAqDKytsJ17BpYTyIVwi8MamAJ1zY +RbehDQ7gCQvddNC/AJrUnRU1WWElIkZ4pXHF60fcRE= X-Spam-Status: No, score=-1161.0 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, NICE_REPLY_A, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: cygwin@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jul 2021 06:53:17 -0000 On 2021-07-19 11:40, Jeremy Hetzler via Cygwin wrote: > Upon installing Cygwin and cron on a new Windows Server 2019 machine, > we are unable to get cron to work. > > I installed cron using cron-config. Cron is configured to run under > account cyg_server, which cron-config set up. cron-config reported > that "cyg_server is a valid privileged account". > >>From cronevents, I see numerous errors saying "can't switch user > context". It looks like every time cron tries to run a job, it emits > one of these errors. > > Example: >> 2021/07/15 18:45:02 [cyg_server] /usr/sbin/cron: PID 6421: (CRON) error (can't switch user context) > > See attached for cronbug output. > > I tried rebooting the machine, but this did not help. > > How can we get cron to work on this new machine? > > Please copy me on any responses; thank you. Use the recommended local System account and you should have no problems with recent Cygwin services under recent Windows: "To run multiple users, cron must change user context without knowing the passwords. There are three methods to do that, as explained in http://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-nopasswd1 If all the cron users have executed "passwd -R" (see man passwd), which provides access to network drives, or if you are using the [obsolete] cyglsa package, then cron should run under the local system account." -- Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada This email may be disturbing to some readers as it contains too much technical detail. Reader discretion is advised. [Data in binary units and prefixes, physical quantities in SI.]