On Mon, Dec 11, 2023 at 02:07:08PM +0000, Jon Turney wrote: > On 09/12/2023 21:55, Adam Dinwoodie via Cygwin wrote: > > Hi, > > > > 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 > > You might test this hypothesis by attempting to run 'true', or perhaps it > needs to be something that runs forever like 'sleep infinity' and see if you > get the same error about netlogon? > > (Or are you able to run other cygwin services without problems?)
Good question! Looks like this is common to all services installed with cygrunsrv and a specific user: # cygrunsrv -I sleeptest -p /usr/bin/sleep -a infinity -u EUROPE+adinwoodie Enter password of user `EUROPE\adinwoodie': Re-enter, please: # cygrunsrv -Q sleeptest Service : sleeptest Current State : Stopped Command : /usr/bin/sleep infinity # cygrunsrv -S sleeptest cygrunsrv: Error starting a service: StartService: Win32 error 1068: The dependency service or group failed to start. So I think that strongly points towards either (a) an issue with cygrunsrv, or (b) using usernames like this is just doomed to failure and cron-config might benefit from suggesting better options or at least warning there aren't any. -- 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