public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Brian Inglis <Brian.Inglis@SystematicSw.ab.ca>
To: cygwin@cygwin.com
Cc: Jeremy Hetzler <jhetzler.atticus@gmail.com>, jhetzler@chabaso.com
Subject: Re: cron problem -- can't switch user context
Date: Tue, 20 Jul 2021 00:53:12 -0600	[thread overview]
Message-ID: <34b44dbc-8522-4af8-f973-4c401a7e4ed3@SystematicSw.ab.ca> (raw)
In-Reply-To: <CAHZxHHLAPVMEWqYd5vmaUu-vnJ9MGvF-PV6rd9tRgDFwfyrfew@mail.gmail.com>

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

      reply	other threads:[~2021-07-20  6:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-19 17:34 Jeremy Hetzler
2021-07-19 17:40 ` Jeremy Hetzler
2021-07-20  6:53   ` Brian Inglis [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=34b44dbc-8522-4af8-f973-4c401a7e4ed3@SystematicSw.ab.ca \
    --to=brian.inglis@systematicsw.ab.ca \
    --cc=cygwin@cygwin.com \
    --cc=jhetzler.atticus@gmail.com \
    --cc=jhetzler@chabaso.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).