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. Also check the deps with `sc qc cron` and follow the chain to see where netlogon gets involved.

--
Take care. Thanks, Brian Inglis              Calgary, Alberta, Canada

La perfection est atteinte                   Perfection is achieved
non pas lorsqu'il n'y a plus rien à ajouter  not when there is no more to add
mais lorsqu'il n'y a plus rien à retirer     but when there is no more to cut
                                -- Antoine de Saint-Exupéry


--
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

Reply via email to