KARR, DAVID | 22 Sep 03:00 2013
Picon

Confused about several issues with setting up cron

CYGWIN_NT-6.1 1.7.25(0.270/5/3) 2013-08-31 20:39 i686 Cygwin

I want to set up a cron job, so I have to get cron configured.  I'm trying to follow the instructions I can find,
but I'm seeing several issues.

I'm surprised that there's nothing in the user guide or the FAQ about setting up cron.  I had to settle for the
various questions about this on StackOverflow and others.

I must have done something at least half correct, because I believe this tells me that cron is running:

% cygrunsrv -L
cron

% cronevents
2013/09/20 21:14:06 [dk068x] crontab: PID 5924: (dk068x) LIST (dk068x)
2013/09/21 11:28:15 [dk068x] /usr/sbin/cron: PID 4980: (CRON) STARTUP (V5.0)
2013/09/21 11:28:16 [dk068x] cron: PID 8424: `cron' service started

However, I then do "crontab <pathtomycrontabfile>", where "pathtomycrontabfile" is the path to my
crontab file with the job I want to run.  I then do "crontab -l" and it prints nothing.  There is nothing in "/var/log/cron*".

I did get some errors when I ran "cron-config", but I unfortunately lost that output.

bartels | 22 Sep 17:56 2013

Re: Confused about several issues with setting up cron

On 09/22/2013 03:00 AM, KARR, DAVID wrote:
> CYGWIN_NT-6.1 1.7.25(0.270/5/3) 2013-08-31 20:39 i686 Cygwin
>
> I want to set up a cron job, so I have to get cron configured.  I'm trying to follow the instructions I can find,
but I'm seeing several issues.
>
> I'm surprised that there's nothing in the user guide or the FAQ about setting up cron.  I had to settle for the
various questions about this on StackOverflow and others.

Must say your reporting of events is also lacking crucial elements
If you re-install and give me more details, then I will try and answer your questions.

- bartels

bartels | 22 Sep 21:43 2013

Re: Confused about several issues with setting up cron

On 09/22/2013 05:56 PM, bartels wrote:
> On 09/22/2013 03:00 AM, KARR, DAVID wrote:
>> CYGWIN_NT-6.1 1.7.25(0.270/5/3) 2013-08-31 20:39 i686 Cygwin
>>
>> I want to set up a cron job, so I have to get cron configured. I'm trying to follow the instructions I can
find, but I'm seeing several issues.
>>
>> I'm surprised that there's nothing in the user guide or the FAQ about setting up cron.  I had to settle for
the various questions about this 
>> on StackOverflow and others.
>

By the way: SYSTEM is not a user.

- bartels

Andrey Repin | 23 Sep 16:44 2013
Picon

Re: Confused about several issues with setting up cron

Greetings, bartels!

>>> CYGWIN_NT-6.1 1.7.25(0.270/5/3) 2013-08-31 20:39 i686 Cygwin
>>>
>>> I want to set up a cron job, so I have to get cron configured. I'm trying to follow the instructions I can
find, but I'm seeing several issues.
>>>
>>> I'm surprised that there's nothing in the user guide or the FAQ about setting up cron.  I had to settle for
the various questions about this 
>>> on StackOverflow and others.
>>

> By the way: SYSTEM is not a user.

Since when?

--
WBR,
Andrey Repin (anrdaemon <at> yandex.ru) 23.09.2013, <18:43>

Sorry for my terrible english...

bartels | 23 Sep 18:07 2013

Re: Confused about several issues with setting up cron

On 09/23/2013 04:44 PM, Andrey Repin wrote:
> Greetings, bartels!

Greetings Andrey!

>
>> By the way: SYSTEM is not a user.
> Since when?

Since Bill Gates stopped sleeping in his garage? :)

$ passwd SYSTEM
passwd: unknown user SYSTEM

Without knowing too much about Windows internals, I have always considered SYSTEM to be a context, rather
than a user.

Please give me your take, if you have more info.
I am interested

- bartels.

Andrey Repin | 23 Sep 20:08 2013
Picon

Re: Confused about several issues with setting up cron

Greetings, bartels!

>>> By the way: SYSTEM is not a user.
>> Since when?

> Since Bill Gates stopped sleeping in his garage? :)

> $ passwd SYSTEM
> passwd: unknown user SYSTEM

> Without knowing too much about Windows internals, I have always considered
> SYSTEM to be a context, rather than a user. 

Your assumption is wrong. Greatly simplifying, NT AUTHORITY\SYSTEM is a
built-in access control group, under which whole system kernel works.
Taking out the rights for SYSTEM to f.e. access certain directory will prevent
most services from changing it.

> Please give me your take, if you have more info.
> I am interested

It's offtopic in this mailing list.
If you're interested in a full list of built-in users and groups, I suggest
you check the user list as given by ACL editors, when you use search function.

--
WBR,
Andrey Repin (anrdaemon <at> yandex.ru) 23.09.2013, <22:01>

Sorry for my terrible english...
(Continue reading)

bartels | 23 Sep 20:59 2013

Re: Confused about several issues with setting up cron

On 09/23/2013 08:08 PM, Andrey Repin wrote:
> Greetings, bartels!
>
>>>> By the way: SYSTEM is not a user.
>>> Since when?
>> Since Bill Gates stopped sleeping in his garage? :)
>> $ passwd SYSTEM
>> passwd: unknown user SYSTEM
>> Without knowing too much about Windows internals, I have always considered
>> SYSTEM to be a context, rather than a user.
> Your assumption is wrong.
You are persuing a childish argument in semantics.
I think we both know what the SYSTEM means.

And windows loudly disagrees with you:

   $ net user SYSTEM
   The user name could not be found.

> Greatly simplifying, NT AUTHORITY\SYSTEM is a
> built-in access control group, under which whole system kernel works.

You are saying it: SYSTEM is a UAC.

Besides, your argument is off topic, as this thread is about setting up sshd.
cron-config does not accept SYSTEM as a user

Of course we both know that to be just a limitation of cron-config.

- bartels
(Continue reading)

bartels | 23 Sep 21:25 2013

Re: Confused about several issues with setting up cron

On 09/23/2013 08:59 PM, bartels wrote:
> cron-config does not accept SYSTEM as a user

Hmm, looking at the script, it would seem that cron-config is capable of configuring cron to run as system.

- bartels

bartels | 22 Sep 21:45 2013

Re: Confused about several issues with setting up cron

On 09/22/2013 05:56 PM, bartels wrote:
> On 09/22/2013 03:00 AM, KARR, DAVID wrote:
>> CYGWIN_NT-6.1 1.7.25(0.270/5/3) 2013-08-31 20:39 i686 Cygwin
>>
>> I want to set up a cron job, so I have to get cron configured. I'm trying to follow the instructions I can
find, but I'm seeing several issues.
>>
>> I'm surprised that there's nothing in the user guide or the FAQ about setting up cron.  I had to settle for
the various questions about this 
>> on StackOverflow and others.
>
 >>> I want to set up a cron job, so I have to get cron configured.  I'm trying
 >> to follow the instructions I can find, but I'm seeing several issues.
 >>> I'm surprised that there's nothing in the user guide or the FAQ about
 >> setting up cron.  I had to settle for the various questions about this on
 >> StackOverflow and others.
 >>
 >> Must say your reporting of events is also lacking crucial elements
 >> If you re-install and give me more details, then I will try and answer your
 >> questions.
 > Ok.  I assume you mean re-installing cron, not Cygwin.
Yes, cron-config is what I meant.
 >
 > I followed the process described in the FAQ for removing a service.  I then ran cron-config again.  When I did
this before, I selected to run
cron as myself.  I decided to make it run as the local system account this time (first running "passwd -R" and
entering my password).  It 
appeared to complete without errors or warnings.  I did this in a "run as administrator" window.
 >
 > In a normal window, I then ran "crontab -e".  I figured this would put me into "vi" with an empty buffer.  It
(Continue reading)

Larry Hall (Cygwin | 23 Sep 03:35 2013

Re: Confused about several issues with setting up cron

On 9/21/2013 9:00 PM, KARR, DAVID wrote:
> I'm surprised that there's nothing in the user guide or the FAQ about
> setting up cron.  I had to settle for the various questions about this on
> StackOverflow and others.

For Cygwin packages other than the one providing the Cygwin DLL itself,
Cygwin-specific documentation is provided under /usr/share/doc/Cygwin.
General package documentation is found under /usr/share/doc/≤package name>.

--

-- 
Larry

_____________________________________________________________________

A: Yes.
 > Q: Are you sure?
 >> A: Because it reverses the logical flow of conversation.
 >>> Q: Why is top posting annoying in email?

Steve | 24 Sep 19:41 2013
Picon

Re: Confused about several issues with setting up cron

I would try the following methods:

First make sure you are launching your local terminal with "Runas
Administrator" checked, even if you are the Administrator user. I am
also asuming you have done the normal stuff like cygcheck -c, and make
sure you have not loaded duplicate dlls during your troubleshooting.
If you ever get resource fork issues with parent != child error
messages right in the term, that needs to be fixed by removing the
duplicate dll file. And run /bin/rebaseall from dash or ash terminals
(disable Anti-viri).
Always manually right click and Run mintty as Administrator, also try
changing the path in the mintty shortcut to
c:\cygwin\bin\mintty.exe -
% cygrunsrv -R cron
reboot to be on the safe side
After bootup use cygwin setup to uninstall cron, then run setup again
and install it.
% cron-config
You shouldn't need todo anything custom here, yes and defaults to
everything. It should be using your current user account, and that is
hopefully the full fledged Administrator account, and not some other
user with admin privs. Which also means you are currently logged into
windows as the full Administrator account.
% net start cron
% EDITOR=vi
or whatev
% crontab -e
create an entry that just fires of something basic very frequently for instance
*/1  * * * * echo "this" > /cygdrive/c/Users/
Administrator/Desktop/test.file.txt
(Continue reading)


Gmane