X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2416D385735A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1702295734; bh=YDnBeu0Hs1BMUzcA4ykA08sctGdjEt5Vj+neuhHzqGg=; h=Date:To:Subject:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=A5hnPgZMlaKlV3vYfpGLIMgHtvHF+pc1uGYOotyf5PDHeyH6nDrQsrT321BWo2ETq v6fp5cOdi35qSNNw8AUjTWfxfLHSpwKLNQuZwGXZ+WgiOuz3s3G4TkT+Wj47teSh6L 9v14uRRPVKxyMTP2nClyFZnIyr7gldreje4S//8Y= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 56C763857711 ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 56C763857711 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1702295719; cv=none; b=rBSFSmDZKfDcXhlsilsi4WoxI/Xsp5b5/ma1WysvI3Fp4Bof4qS9cn40pyGqZIS6tIDzoZsVValRO5Wyq2KX9NlRiHDPRv2f2kb0iTuFLg+OabyvIPA48WHpqoxNAZ6KG6aZYVPQRdfy2K5Y8LuTe7/T9S6y/pI/Bba5FkTY8b0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1702295719; c=relaxed/simple; bh=e0243ZxchjOaEiwbZuDiYBGamu4ZItv9vN1dw50vnZ4=; h=Date:From:To:Subject:Message-ID:MIME-Version; b=sSPO2pGut0/gmQb7ydY6p1AKPEOGXaGfOchR0A1DbJ3eNJdXo1qhUJEOlORWqP8SkDIGitF45MZJBQhYak3H60mzcmOTasauT+mWaznGnszv+HIFrtPtTKZraUajqeH7NVvP+0jlYK1OwJwtZUYKvnqhQWtvURgqY/M1AS9eKfM= ARC-Authentication-Results: i=1; server2.sourceware.org Date: Mon, 11 Dec 2023 11:55:15 +0000 To: cygwin AT cygwin DOT com Subject: Re: Cannot set up cron as a service on corporate PC Message-ID: <20231211115515.vea2vv5k55dzkpe2@lucy.dinwoodie.org> References: <20231209215527 DOT bg5slflpy6bufbmw AT lucy DOT dinwoodie DOT org> <9e2df6c4-a17c-4792-bc97-94158a61d2d9 AT Shaw DOT ca> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <9e2df6c4-a17c-4792-bc97-94158a61d2d9@Shaw.ca> X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, RDNS_DYNAMIC, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.30 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Adam Dinwoodie via Cygwin Reply-To: Adam Dinwoodie Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com Sender: "Cygwin" On Sun, Dec 10, 2023 at 09:22:12AM -0700, Brian Inglis via Cygwin wrote: > On 2023-12-09 14:55, Adam Dinwoodie via Cygwin wrote: > > I've been trying to set up Cygwin cron to work as a service on my work > > PC. I'm able to get it working just fine on a Windows system where I'm > > using a personal Microsoft account, but when I attempt the same process > > using on a Windows system using my work account, I get the following > > error: > > cygrunsrv: Error starting a service: StartService: Win32 error 1068: > > The dependency service or group failed to start. > > I also note that in the failing scenario, I see the following log appear > > at this time in Windows Event Viewer: > > > This computer is configured as a member of a workgroup, not as a > > > member of a domain. The Netlogon service does not need to run in this > > > configuration. > > I've reproduced this behaviour in virtual machines using fresh > > installations of Windows, and where the only actions taken were to > > bootstrap, log in, install Cygwin including cygrunsrv and cron, then > > attempt to set up cron as a service. I've attached copies of the MinTTY > > output and the cronbug.txt files (which appear to include the normal > > cygcheck -srv output, so I've not added those separately. I've also > > attached the full Event Viewer log > > My guess is that something about how Windows manages user accounts has > > changed over the years, and cygrunsrv hasn't been updated to cope, but > > that's a very wild guess. Searching the archives hasn't got me very > > far; mostly I've found references to cyglsa, which I get the impression > > is thoroughly deprecated, and based on > > https://www.cygwin.com/cygwin-ug-net/ntsec.html#ntsec-nopasswd3 I don't > > think it's appropriate anyway due to the way the password is stored. > > For now I'm continuing to use a snippet in my .bashrc to start cron when > > I first start Bash, but that's not the nicest of workarounds. Does > > anyone have suggestions for anything better? > > Never any issues here with cron, other than no mail, but I run mainly run > scripts that log to /var/log/, and syslog rules that chmod a+r. > I installed cyglsa many years ago, but don't think that's used any more, and > I also used passwd -R, so that should still be around. > I have also customized my daemon services so auto-start is delayed, notify > on pre-shutdown, and depend on others: cron -> syslog-ng -> cygserver -> > SamSS Security Accounts Manager, as I an not in a domain. > > Given the error, I suggest checking the system config, as it either needs to > be a domain member, with DC/AD access, or you need your work user created > locally. I'm honestly not sure what system config I'd need to check here. Can you give any more detailed instructions? > Also check the deps with `sc qc cron` and follow the chain to see where > netlogon gets involved. That doesn't seem useful, sadly: as far as I can tell, cron has no dependencies, so it's not clear to me why netlogon is getting involved at all. $ sc qc cron [SC] QueryServiceConfig SUCCESS SERVICE_NAME: cron TYPE : 10 WIN32_OWN_PROCESS START_TYPE : 2 AUTO_START ERROR_CONTROL : 1 NORMAL BINARY_PATH_NAME : C:\cygwin64\bin\cygrunsrv.exe LOAD_ORDER_GROUP : TAG : 0 DISPLAY_NAME : Cron daemon DEPENDENCIES : SERVICE_START_NAME : EUROPE\adinwoodie I get the same results running that in Cygwin Bash and in PowerShell, and with either started normally or running with Administrator permissions. -- 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