X-Recipient: archive-cygwin AT delorie DOT com X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com 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 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 To: cygwin AT cygwin DOT com References: From: Brian Inglis Organization: Systematic Software 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-Language: en-CA 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 AT cygwin DOT 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: , Reply-To: cygwin AT cygwin DOT com Cc: jhetzler AT chabaso DOT com, Jeremy Hetzler Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com Sender: "Cygwin" 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.] -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple