X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=BfeAngpfqOKmynrm pUiHFaV/qToyQJ5taQx/wzZx+TegFNcJF1NdtDwRGWbBVzuUCN4nVO90qnQQJWuJ NgKBXZ0x63Gj3GpjH4oPIXYzMPhgWRHnuBOyTGsRfNgF6cxj5lFUbijCVH8OU4o8 c8dVppyRNdLbSGl+PSZKZqAD2uw= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; s=default; bh=YGuwg+zcQnwzqPDuccl6T8 A/VXY=; b=hQvQYdq+fssQFeA2cIzGvStlilHZ0aEQvJyJMnNoH98WGUD9Ea2YZu N8jO7mZ7Obv6b1jlFTQ23giM7ImWSZPsYKhqQfuiiFo54b7EOXdukyVBj6k/h5mS fDwqDB4k0oiAvAS91/smyVA6Z6sENtVGuG8xIz9XYrwpx3QFCcsM8= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=1.4 required=5.0 tests=AWL,BAYES_50,KAM_INFOUSMEBIZ,SPF_PASS,URI_HEX autolearn=no version=3.3.2 spammy=pierre, 4163, 2873, Surface X-HELO: zwork11.zwpost.com X-Received: by 10.140.166.10 with SMTP id m10mr21723285qhm.35.1450664596289; Sun, 20 Dec 2015 18:23:16 -0800 (PST) Subject: Re: empty cron.log To: Pierre DOT Humblet AT alum DOT mit DOT edu, "'Jason Crawford'" , "'CygWin mailing list'" References: <201512191740 DOT tBJHedbN024801 AT zwork11 DOT zwpost DOT com> From: Jason Crawford Message-ID: <56776290.4040106@gmail.com> Date: Sun, 20 Dec 2015 21:23:12 -0500 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <201512191740.tBJHedbN024801@zwork11.zwpost.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Hello to everyone following along. Pierre and I worked off-line on this problem. We didn't yet figure out how to run cron as self (using cron-config and specifying self) on Windows 10 with a Microsoft Id. We did figure out another approach though that does work on Windows 10 with a Microsoft Id: 1) install cywin inetutils, cron 2) Start a cygwin window as administrator 3) Run ssh-host-config -y . We don't actually need it to set up a sshd daemon/service, but this script creates a privileged cyg_server account on the machine that is configured in a way that we can use. Feel free to subsequently run cygrunsrv -R sshd if you don't need sshd. 4) Now run cron-config. If it asks, have it stop the running crond. Tell it you do want it create a service. You probably want to specify a blank string for the CYGWIN value, aka, just hit Enter. When asked if the crond should run as self, say "no". When asked if passwd -R will be set up for all id's, say "no". It should then recognize that the cyg_server account should work. It will ask you if you want to specify an account other than that. Answer "no". If it warns you about the /var /var/cron and /var/cron/tabs permissions, you can probably ignore that and continue. You can tell it to go ahead and start the crond service. 5) As usual, you'll still need to run crontab to tell crond what it should run for you. I think that's about it. Good luck everyone. J. On 12/18/2015 2:34 PM, Pierre A Humblet wrote: >> -----Original Message----- >> From: Jason Crawford >> Sent: Friday, December 18, 2015 1:01 PM >> >> On 12/18/2015 9:50 AM, Pierre A Humblet wrote: >>>> -----Original Message----- >>>> From: Jason Crawford >>>> Sent: Friday, December 18, 2015 2:17 AM >>>> >>>> Hello everyone, >>>> Thanks for a great offering and all the help you provide. I've >>>> used cygwin for a few years, but not deeply. cron is one of the tools I >>>> find very handy. Recently I upgraded to Windows 10 and ran in to >>>> problems on my Surface Pro 3. I installed cygwin cron (latest cygwin >>>> 32bit (2.873). Cron is 4.1-63.) and it seemed to work but as soon as >>>> I switched my laptop to use the Microsoft ID cron as Microsoft suggest, >>>> cron stopped working, complaining that it can not switch id's. If I do >>>> a fresh install of Win10, switch to the Microsoft ID, and install cygwin >>>> and cron, cron won't even work once. And if I do a fresh install of >>>> Win10 and never switch to the Microsoft id, cygwin cron works fine. >>>> When it fails, the cronevents log file complains that it can't switch user >> id's. >>>> I really don't do much. I just install cygwin with cron, emacs, ssh, >>>> inetutils, unison, wget. Then I start up a cygwin window as >>>> administrator. Then cron-config, yes (service), [] (blank CYGWIN), >>>> yes (self), yes (start daemon). Then I create a trivial cron file "*/1 >>>> * * * * date >~/cron_is_running.txt". crontab mycron ... and I >>>> wait a minute. Then I invoke cronevents. >>>> >>>> I want to try out all the features of that Microsoft touts as coming >>>> with use of the Microsoft ID, but I don't want to lose cron. >>>> >>>> What do we all suggest that I do next? >>> Is that only with Cron or also with other services such as passwordless >> sshd? >> I don't run sshd on the machine (as far as I know). I only ssh out. >> That works fine without a password. But... >> >> But I've just tried setting up sshd on two Windows machines just now. >> I ran in to a few complications due to being a novice, but it eventually >> worked on Windows 7. I've still not gotten sshd to work on Windows 10 >> if my ssh client is on another machine. That seems to be some sort of >> network connection or firewall problem. I can ssh from the local Win10 >> machine to the local Win10 machine though. I have only one account and >> I can ssh in to that without a password using authorized_keys. >> >> Does that answer your question? Is there a simpler or more helpful way >> that I can gather data for you? I don't mind reinstalling the >> operating system if that would help. > Thanks, Jason. > > I assume both cron-config and ssh-host-config asked you for the name of a privileged user, > and you used the same name in both cases. > > You may want to try what I suggested to someone else a while ago > http://cygwin.1069669.n5.nabble.com/cron-error-can-t-switch-user-context-td61919.html > > The instructions were, as follows, except that now the service should run under the privileged account, > (use -u), not under SYSTEM (the default) > >> Stop the cron service. >> Use a simple crontab that runs every minute, for only one user. >> Using cygrunsrv, create a new service runing "strace" with argument "cron" under SYSTEM >> 1) cygrunsrv -I trace_cron -p /usr/bin/strace -a /usr/sbin/cron >> 2) cygrunsrv -S trace_cron >> 3) Let this run for no more than 2 minutes, output will be in /var/log/trace_cron.log >> You may have to use kill -9 to stop the service (kill the cron pid) >> 4) Send the trace_cron.log file as an attachment. >> 5) Remove the trace_cron service > > Pierre > > -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple