Re: cygwin Cron on Windows 2003 Server Issues

2004-09-13 Thread Shankar Unni
Christopher Faylor wrote:
The main cygwin page provides a link that should make things pretty
clear about how to subscribe to the cygwin lists.
BTW: For those who don't want to fill up their mailboxes with 100+ 
messages a day, you can also go through the NNTP gateway at 
news.gmane.org, which carries this list with a 2-way gateway as the 
newsgroup gmane.os.cygwin.

But if you have any trouble posting via this route, you're on your own. 
The recommended mechanism is still subscribing to the mailing list. Use 
filtering or an alternate mailbox to help manage the traffic..

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/


Re: Cygwin Cron on Windows 2003 Server Issues

2004-09-10 Thread Larry Hall
At 10:43 AM 9/10/2004, you wrote:
Folks - any assistance would be greatly appreciated...


And what about Igor's response would not qualify as assistance?
If you're looking for something specific, you should ask the specific
question.  I thought Igor's reply looked quite helpful and was certainly
an excellent attempt at assistance.  If it's not for you, then at the
very least you need to be more specific about the kind of assistance
you're looking for.  Or maybe I just missed a portion of this thread.
I tried to go back and recap from the web but it looks like your replies
(at least) break the thread every time.  I got tired of searching for some
new branch...



--
Larry Hall  http://www.rfk.com
RFK Partners, Inc.  (508) 893-9779 - RFK Office
838 Washington Street   (508) 893-9889 - FAX
Holliston, MA 01746 


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Cygwin Cron on Windows 2003 Server Issues

2004-09-10 Thread Paul J. Ghosh
Thank you all for your help.  We pursued all that was recommended and
still ran into the error: cron : PID 3784 : starting service `cron'
failed: execv: 128, Transport endpoint is not connected.

Since invoking it command line was successful we put a wrapper in place
that executes cron and added the wrapper as a service.  cron is now
working.  For the issue where crontab assumes that SYSTEM is the owner
of the cron service and leaves the contents of the /var/cron/tabs as 640
with a group of SYSTEM we also created a wrapper that changes the
permission to 644.

Here is the detail of what we have put into place and provided to the
release engineer:

overview:
- create local user called 'svccron'
- set up permissions for local user
- create wrappers for cron/crontab
- add wrapped cron as service
- set up schedules

execute the following within a bash shell:

- create local user called 'svccron'

net user svccron passwd /add /yes
net localgroup administrators_group_name svccron /add
editrights -a SeAssignPrimaryTokenPrivilege -u svccron
editrights -a SeCreateTokenPrivilege -u svccron
editrights -a SeIncreaseQuotaPrivilege -u svccron
editrights -a SeServiceLogonRight -u svccron
mkpasswd -l -u svccron  /etc/passwd

for security reasons:
editrights -a SeDenyInteractiveLogonRight -u svccron
editrights -a SeDenyNetworkLogonRight -u svccron
editrights -a SeDenyRemoteInteractiveLogonRight -u svccron

- create wrapper for cron - attached 'xcron'/contents below
- install in /usr/sbin
- change permissions for xcron
$ chmod 744 /usr/sbin/xcron

$ cat /usr/sbin/xcron
#!/usr/bin/bash
/usr/sbin/cron -D

$ ls -l /usr/sbin/xcron
-rwxr-xr-x1 devadm   Domain U   34 Sep 10 14:03
/usr/sbin/xcron

- create wrapper for crontab - attached 'xcrontab'/contents
below
- install in /usr/bin
- change permissions for xcrontab
$ chmod 744 /usr/bin/xcrontab

$ cat /usr/bin/xcrontab
#!/usr/bin/bash
/usr/bin/crontab $@;
xval=$?;
chmod 644 /var/cron/tabs/$USER;
exit $xval;

$ ls -l /usr/bin/xcrontab
-rwxr-xr-x1 devadm   Domain U   90 Sep 10 13:58
/usr/bin/xcrontab

- add wrapped cron as service
$ cygrunsrv -I xcron -p /usr/sbin/xcron -a -u svccron -w
passwd

- execute following as user for which tasks need to be scheduled
$ xcrontab -e

- for details
$ man 5 crontab


Regards,

Paul J. Ghosh


xcron
Description: Binary data


xcrontab
Description: Binary data
--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/

Re: Cygwin Cron on Windows 2003 Server Issues

2004-09-10 Thread Igor Pechtchanski
On Fri, 10 Sep 2004, Paul J. Ghosh wrote:

 Thank you all for your help.  We pursued all that was recommended and
 still ran into the error: cron : PID 3784 : starting service `cron'
 failed: execv: 128, Transport endpoint is not connected.

 Since invoking it command line was successful we put a wrapper in place
 that executes cron and added the wrapper as a service.  cron is now
 working.  For the issue where crontab assumes that SYSTEM is the owner
 of the cron service and leaves the contents of the /var/cron/tabs as 640
 with a group of SYSTEM we also created a wrapper that changes the
 permission to 644.

 Here is the detail of what we have put into place and provided to the
 release engineer:

 overview:
   - create local user called 'svccron'
   - set up permissions for local user
   - create wrappers for cron/crontab
   - add wrapped cron as service
   - set up schedules

 execute the following within a bash shell:

   - create local user called 'svccron'

   net user svccron passwd /add /yes
   net localgroup administrators_group_name svccron /add
   editrights -a SeAssignPrimaryTokenPrivilege -u svccron
   editrights -a SeCreateTokenPrivilege -u svccron
   editrights -a SeIncreaseQuotaPrivilege -u svccron
   editrights -a SeServiceLogonRight -u svccron
   mkpasswd -l -u svccron  /etc/passwd

   for security reasons:
   editrights -a SeDenyInteractiveLogonRight -u svccron
   editrights -a SeDenyNetworkLogonRight -u svccron
   editrights -a SeDenyRemoteInteractiveLogonRight -u svccron

   - create wrapper for cron - attached 'xcron'/contents below
   - install in /usr/sbin
   - change permissions for xcron
   $ chmod 744 /usr/sbin/xcron

   $ cat /usr/sbin/xcron
   #!/usr/bin/bash
   /usr/sbin/cron -D

   $ ls -l /usr/sbin/xcron
   -rwxr-xr-x1 devadm   Domain U   34 Sep 10 14:03 /usr/sbin/xcron

   - create wrapper for crontab - attached 'xcrontab'/contents below
   - install in /usr/bin
   - change permissions for xcrontab
   $ chmod 744 /usr/bin/xcrontab

   $ cat /usr/bin/xcrontab
   #!/usr/bin/bash
   /usr/bin/crontab $@;
   xval=$?;
   chmod 644 /var/cron/tabs/$USER;
   exit $xval;

   $ ls -l /usr/bin/xcrontab
   -rwxr-xr-x1 devadm   Domain U   90 Sep 10 13:58 /usr/bin/xcrontab

   - add wrapped cron as service
   $ cygrunsrv -I xcron -p /usr/sbin/xcron -a -u svccron -w passwd

   - execute following as user for which tasks need to be scheduled
   $ xcrontab -e

   - for details
   $ man 5 crontab

Well, Larry is right -- it's very hard to follow a thread where the
replies neither quote the original message nor have the correct
References: or In-Reply-To: fields.  However, I've just reviewed the whole
thread.  I don't believe you (or Anna Goldberg) ever said what the exact
cygrunsrv invocation of the cron service was.

Had you said that, it would have been rather obvious that you were simply
missing the -D argument to cron, and that adding that would have most
likely solved your problem.

FWIW, I don't believe the cygrunsrv invocation above works for you, since
the -a flag requires an argument, and will grab the -u.  You probably
didn't cut-and-paste the exact command.

In any case, you can try simply using

$ cygrunsrv -I cron -p /usr/sbin/cron -a -D -u svccron -w passwd

and see if it works.  The crontab trick, on the other hand, might be
necessary.
HTH,
Igor
-- 
http://cs.nyu.edu/~pechtcha/
  |\  _,,,---,,_[EMAIL PROTECTED]
ZZZzz /,`.-'`'-.  ;-;;,_[EMAIL PROTECTED]
 |,4-  ) )-,_. ,\ (  `'-'   Igor Pechtchanski, Ph.D.
'---''(_/--'  `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

Happiness lies in being privileged to work hard for long hours in doing
whatever you think is worth doing.  -- Dr. Jubal Harshaw

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Cygwin Cron on Windows 2003 Server Issues

2004-09-10 Thread Pierre A. Humblet
On Fri, Sep 10, 2004 at 04:45:07PM -0500, Paul J. Ghosh wrote:
 Thank you all for your help.  We pursued all that was recommended and
 still ran into the error: cron : PID 3784 : starting service `cron'
 failed: execv: 128, Transport endpoint is not connected.
 
 Since invoking it command line was successful we put a wrapper in place
 that executes cron and added the wrapper as a service.  cron is now
 working.  For the issue where crontab assumes that SYSTEM is the owner
 of the cron service and leaves the contents of the /var/cron/tabs as 640
 with a group of SYSTEM we also created a wrapper that changes the
 permission to 644.
 
 Here is the detail of what we have put into place and provided to the
 release engineer:
 
 overview:
   - create local user called 'svccron'
   - set up permissions for local user
   - create wrappers for cron/crontab
   - add wrapped cron as service
   - set up schedules
 
 execute the following within a bash shell:
 
   - create local user called 'svccron'
 
   net user svccron passwd /add /yes
   net localgroup administrators_group_name svccron /add
   editrights -a SeAssignPrimaryTokenPrivilege -u svccron
   editrights -a SeCreateTokenPrivilege -u svccron
   editrights -a SeIncreaseQuotaPrivilege -u svccron
   editrights -a SeServiceLogonRight -u svccron
   mkpasswd -l -u svccron  /etc/passwd
 
   for security reasons:
   editrights -a SeDenyInteractiveLogonRight -u svccron
   editrights -a SeDenyNetworkLogonRight -u svccron
   editrights -a SeDenyRemoteInteractiveLogonRight -u svccron
 
   - create wrapper for cron - attached 'xcron'/contents below
   - install in /usr/sbin
   - change permissions for xcron
   $ chmod 744 /usr/sbin/xcron
 
   $ cat /usr/sbin/xcron
   #!/usr/bin/bash
   /usr/sbin/cron -D
 
   $ ls -l /usr/sbin/xcron
   -rwxr-xr-x1 devadm   Domain U   34 Sep 10 14:03
 /usr/sbin/xcron
 
   - create wrapper for crontab - attached 'xcrontab'/contents
 below
   - install in /usr/bin
   - change permissions for xcrontab
   $ chmod 744 /usr/bin/xcrontab
 
   $ cat /usr/bin/xcrontab
   #!/usr/bin/bash
   /usr/bin/crontab $@;
   xval=$?;
   chmod 644 /var/cron/tabs/$USER;
   exit $xval;
 
   $ ls -l /usr/bin/xcrontab
   -rwxr-xr-x1 devadm   Domain U   90 Sep 10 13:58
 /usr/bin/xcrontab
 
   - add wrapped cron as service
   $ cygrunsrv -I xcron -p /usr/sbin/xcron -a -u svccron -w
 passwd
 
   - execute following as user for which tasks need to be scheduled
   $ xcrontab -e
 
   - for details
   $ man 5 crontab
 

I am wondering if the additional steps below would not remove
the need for xcrontab:

1) aftermkpasswd -l -u svccron  /etc/passwd
edit /etc/passwd and set the uid of svccron to 0

2) Change the command in xcron to
su -c exec /usr/sbin/cron -D system

Pierre


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



RE: Cygwin Cron on Windows 2003 Server Issues

2004-09-10 Thread Paul J. Ghosh
Larry/Igor - well - this is the first time I am participating in the
cygwin mailing list and from what I have read at http://ezmlm.org/ it is
supposed to add to threads if the subject is identical.  I have been
using the same subject line.  There was not an initial email that I
could have replied to nor was there a References: that I could have
manipulated when I started.  I read the responses by going to the site
http://cygwin.com/ml/cygwin/2004-09/ which just lists items
chronologically.  But, since it was not available night before last I
discovered the site http://www.mail-archive.com/[EMAIL PROTECTED]/ that
actually does have all my responses threaded correctly.  In fact, the
presentation is prefered since it is by thread/subject as opposed to by
date/time.  So, tell me what I am supposed to do such that responses are
correctly threaded and I will comply...

Igor - even though we did not state the command executed to add cron as
a service it did include the -D option as described in the message
http://www.mail-archive.com/[EMAIL PROTECTED]/msg31538.html.  Yes, we
have tried running it as you have described and it still fails with the
error: cron : PID 3784 : starting service `cron' failed: execv: 128,
Transport endpoint is not connected.  Also yes, you have correctly
pointed out that the -a is erroneous in my summation of steps.  I am
including an updated set of instructions just to ensure that any future
readers will not be mislead.

Pierre - your suggestion - will it not lead to root privileges for
svccron?  If yes, then that is not desirable.  However, I will try it
out and let all know the outcome.  In a bash shell with a simple command
it prompts for a password.

$ su -c exec echo foobar system
Password:
su: incorrect password

Thank you all once again.  Hopefully one of you can get it to work on
W2K3 without wrappers.


Regards,

Paul J. Ghosh

overview:
- create local user called 'svccron'
- set up permissions for local user
- create wrappers for cron/crontab
- add wrapped cron as service
- set up schedules

execute the following within a bash shell:

- create local user called 'svccron'

net user svccron passwd /add /yes
net localgroup administrators_group_name svccron /add
editrights -a SeAssignPrimaryTokenPrivilege -u svccron
editrights -a SeCreateTokenPrivilege -u svccron
editrights -a SeIncreaseQuotaPrivilege -u svccron
editrights -a SeServiceLogonRight -u svccron
mkpasswd -l -u svccron  /etc/passwd

for security reasons:
editrights -a SeDenyInteractiveLogonRight -u svccron
editrights -a SeDenyNetworkLogonRight -u svccron
editrights -a SeDenyRemoteInteractiveLogonRight -u svccron

- create wrapper for cron - attached 'xcron'/contents below
- install in /usr/sbin
- change permissions for xcron
$ chmod 744 /usr/sbin/xcron

$ cat /usr/sbin/xcron
#!/usr/bin/bash
/usr/sbin/cron -D

$ ls -l /usr/sbin/xcron
-rwxr-xr-x1 devadm   Domain U   34 Sep 10 14:03
/usr/sbin/xcron

- create wrapper for crontab - attached 'xcrontab'/contents
below
- install in /usr/bin
- change permissions for xcrontab
$ chmod 744 /usr/bin/xcrontab

$ cat /usr/bin/xcrontab
#!/usr/bin/bash
/usr/bin/crontab $@;
xval=$?;
chmod 644 /var/cron/tabs/$USER;
exit $xval;

$ ls -l /usr/bin/xcrontab
-rwxr-xr-x1 devadm   Domain U   90 Sep 10 13:58
/usr/bin/xcrontab

- add wrapped cron as service
$ cygrunsrv -I xcron -p /usr/sbin/xcron -u svccron -w passwd

- execute following as user for which tasks need to be scheduled
$ xcrontab -e

- for details
$ man 5 crontab


xcrontab
Description: Binary data


xcron
Description: Binary data
--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/

Re: cygwin Cron on Windows 2003 Server Issues

2004-09-10 Thread Christopher Faylor
On Fri, Sep 10, 2004 at 08:27:05PM -0500, Paul J. Ghosh wrote:
Larry/Igor - well - this is the first time I am participating in the
cygwin mailing list and from what I have read at http://ezmlm.org/ it is
supposed to add to threads if the subject is identical.

URL?  This is the first that I've heard that ezmlm is broken on
sourceware.org.

I have been using the same subject line.  There was not an initial
email that I could have replied to nor was there a References: that I
could have manipulated when I started.  I read the responses by going
to the site http://cygwin.com/ml/cygwin/2004-09/ which just lists items
chronologically.

Look closer.  There are a variety of listing options available.

Regardless, this has nothing to do with how some random web archiver
lists email.

You're reading a mailing list.  Respond to the email using any modern
email client and you will preserve threading.

cgf

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: cygwin Cron on Windows 2003 Server Issues

2004-09-10 Thread Paul J. Ghosh
Christopher - you lost me.  How am I supposed to reply to your message
from the site http://cygwin.com/ml/cygwin/2004-09/msg00505.html?  My
current response is being composed by clicking on the button at the
bottom of the page
http://www.mail-archive.com/[EMAIL PROTECTED]/msg44535.html which I am
assuming will contain the correct reference.  Help me out here - I have
web site blindness!

Yes, I have now looked closer and discovered the 'Thread Index' option
on http://cygwin.com/ml/cygwin/2004-09/.  Thank you.

Regards,

Paul J. Ghosh

 


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Cygwin Cron on Windows 2003 Server Issues

2004-09-10 Thread Pierre A. Humblet
On Fri, Sep 10, 2004 at 08:27:05PM -0500, Paul J. Ghosh wrote:
 
 Pierre - your suggestion - will it not lead to root privileges for
 svccron?

You mean setting its uid to 0? It won't change anything for Windows
ntsec. The advantage is that su won't prompt for passwd.
The reason for the su is that cron will run as system, which is what 
crontab expects.

  If yes, then that is not desirable.  However, I will try it
 out and let all know the outcome.  In a bash shell with a simple command
 it prompts for a password.
Except if the uid is 0 !

If it works you could also try to get rid of xcron and run something like
$ cygrunsrv -I cron -p /usr/bin/su -a -c 'exec /usr/sbin/cron -D' system 
-u svccron -w passwd
(my quoting may be off).
Also don't forget to delete /var/run/cron.pid when changing cron daemon uid.

Pierre

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Cygwin Cron on Windows 2003 Server Issues

2004-09-09 Thread Igor Pechtchanski
On Wed, 8 Sep 2004, Paul J. Ghosh wrote:

 Thank you to all who have replied.  Enclosed find the following:

   - contents of crontab for user cdaapp - simple task to be executed
 every minute for testing

Looks ok, but see below for permissions issues.

   - error encountered when starting cron as service_cron - includes
 one as a dialog and another from the event viewer

Hmm, can you log in as service_cron and try running the cron service
command (/usr/sbin/cron -D) and cygcheck -svr from the command line?
That would help answer a few questions...

   - test of task to be executed by cron done manually as user cdaapp
 which succeeded

Again, you need to run this task as service_cron to get a meaningful
result.

   - error encountered when successfully starting cron as Local
 System but fails when it comes time to execute task - we are
 aware of Local System account changes in W2K3 related to setuid
 and were not expecting it to work

But the service started, which shows that it *might* be a permissions
issue.  Besides checking the applications, check all the relevant
directories, and make sure service_cron has the execute permission on them
(which will allow it to enter the directories and access the files in
them), and the write permission to any directory where it needs to create
files.

   - long listing of /bin /usr/sbin /var /var/cron /var/cron/tabs -
 bin executable by all (755)

How about ls -ld /bin /usr/sbin /var/log/cda?

 /var/cron/tabs seems locked down

Actually, since you've started cron as different users, it's possible that
SYSTEM owns some of the files, and service_cron has no access to them
(see, for example, /var/cron/tabs/cdapp).  This *may* be a bug in the
crontab application (i.e., it may assume that SYSTEM will be the user
running cron).

   - parts of /etc/passwd for user cdaapp - tried changing groups
 513/544 without any success

You may need to add service_cron to the SYSTEM group...

   - parts of /etc/group

 Regards,

 Paul J. Ghosh

 [snip]

 ###
 ls -l /var
 total 0
 drwxrwx---+   3 devadm   Users   0 Sep  1 09:19 cache
 drwxrwxrwt+   3 devadm   Users   0 Oct  7  2003 cron
 drwxrwx---+   2 devadm   Users   0 Sep  7 17:04 log
 ^^^
Aha.  One problem here.

 drwxr-xr-x+   2 SYSTEM   root0 Oct  7  2003 proftpd
 drwxrwxrwx+   2 devadm   Users   0 Sep  8 14:36 run
 drwxrwx---+   2 devadm   Users   0 Oct  7  2003 tmp

 [snip]
 ###
 ls -l /var/cron/tabs
 total 1
 -rw-r-1 cdaapp   SYSTEM392 Sep  8 13:12 cdaapp
 ^^^
Another here.  This file will be unreadable to a service running as
service_cron, even if you manage to get it started.

 ###
 cygcheck -svr
 [snip]

In the future, please *attach* the output of cygcheck -svr as an
uncompressed text attachment, instead of including it inline.

  1126k 2004/05/26 C:\cygwin\bin\cygwin1.dll - os=4.0 img=1.0 sys=4.0
   cygwin1.dll v0.0 ts=2004/5/25 21:07
 Cygwin DLL version info:
 DLL version: 1.5.10

Probably not related to your problem, but why not upgrade to 1.5.11?

BTW, your /etc/passwd and /etc/group entries look ok.
Igor
-- 
http://cs.nyu.edu/~pechtcha/
  |\  _,,,---,,_[EMAIL PROTECTED]
ZZZzz /,`.-'`'-.  ;-;;,_[EMAIL PROTECTED]
 |,4-  ) )-,_. ,\ (  `'-'   Igor Pechtchanski, Ph.D.
'---''(_/--'  `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

Happiness lies in being privileged to work hard for long hours in doing
whatever you think is worth doing.  -- Dr. Jubal Harshaw

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



RE: Cygwin Cron on Windows 2003 Server Issues

2004-09-09 Thread Anna Goldberg
Attached is the cygcheck when run by service_cron.
Also, when we run the tasks as service_cron via command line the only error 
we're seeing is: cron : PID 2112 : (cdaapp) CAN'T OPEN (tabs/cdaapp), but if 
we're try starting the cron service we still get the error: cron : PID 3784 
: starting service `cron' failed: execv: 128, Transport endpoint is not 
connected.

Igor recommended adding service_cron to the System group, but that group 
doesn't exist in the Windows environment (or at least I couldn't find it). 
Any suggestions as to how to do this if it is possible in the Windows env.? 
Currently the service_cron user is part of the Administrators, Users, and 
Terminal Service Users groups.

Thank you very much,
~ Anna

On Wed, 8 Sep 2004, Paul J. Ghosh wrote:
 Thank you to all who have replied.  Enclosed find the following:

- contents of crontab for user cdaapp - simple task to be
executed
  every minute for testing
Looks ok, but see below for permissions issues.
- error encountered when starting cron as service_cron -
includes
  one as a dialog and another from the event viewer
Hmm, can you log in as service_cron and try running the cron service
command (/usr/sbin/cron -D) and cygcheck -svr from the command line?
That would help answer a few questions...
- test of task to be executed by cron done manually as user
cdaapp
  which succeeded
Again, you need to run this task as service_cron to get a meaningful
result.
- error encountered when successfully starting cron as Local
  System but fails when it comes time to execute task - we are
  aware of Local System account changes in W2K3 related to
setuid
  and were not expecting it to work
But the service started, which shows that it *might* be a permissions
issue.  Besides checking the applications, check all the relevant
directories, and make sure service_cron has the execute permission on
them
(which will allow it to enter the directories and access the files in
them), and the write permission to any directory where it needs to
create
files.
- long listing of /bin /usr/sbin /var /var/cron /var/cron/tabs -
  bin executable by all (755)
How about ls -ld /bin /usr/sbin /var/log/cda?
  /var/cron/tabs seems locked down
Actually, since you've started cron as different users, it's possible
that
SYSTEM owns some of the files, and service_cron has no access to them
(see, for example, /var/cron/tabs/cdapp).  This *may* be a bug in the
crontab application (i.e., it may assume that SYSTEM will be the user
running cron).
- parts of /etc/passwd for user cdaapp - tried changing groups
  513/544 without any success
You may need to add service_cron to the SYSTEM group...
- parts of /etc/group

 Regards,

 Paul J. Ghosh

 [snip]

 ###
 ls -l /var
 total 0
 drwxrwx---+   3 devadm   Users   0 Sep  1 09:19 cache
 drwxrwxrwt+   3 devadm   Users   0 Oct  7  2003 cron
 drwxrwx---+   2 devadm   Users   0 Sep  7 17:04 log
 ^^^
Aha.  One problem here.
 drwxr-xr-x+   2 SYSTEM   root0 Oct  7  2003 proftpd
 drwxrwxrwx+   2 devadm   Users   0 Sep  8 14:36 run
 drwxrwx---+   2 devadm   Users   0 Oct  7  2003 tmp

 [snip]
 ###
 ls -l /var/cron/tabs
 total 1
 -rw-r-1 cdaapp   SYSTEM392 Sep  8 13:12 cdaapp
 ^^^
Another here.  This file will be unreadable to a service running as
service_cron, even if you manage to get it started.
 ###
 cygcheck -svr
 [snip]
In the future, please *attach* the output of cygcheck -svr as an
uncompressed text attachment, instead of including it inline.
  1126k 2004/05/26 C:\cygwin\bin\cygwin1.dll - os=4.0 img=1.0 sys=4.0
   cygwin1.dll v0.0 ts=2004/5/25 21:07
 Cygwin DLL version info:
 DLL version: 1.5.10
Probably not related to your problem, but why not upgrade to 1.5.11?
BTW, your /etc/passwd and /etc/group entries look ok.
Igor
_
Express yourself instantly with MSN Messenger! Download today - it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
Cygwin Configuration Diagnostics
Current System Time: Thu Sep 09 09:10:30 2004
Windows .NET Server Ver 5.2 Build 3790
Path:   C:\cygwin\usr\local\bin
C:\cygwin\bin
C:\cygwin\bin
C:\cygwin\usr\X11R6\bin
c:\blp\API\dde
c:\WINNT\system32
c:\WINNT
c:\WINNT\system32\WBEM
c:\Program Files\Microsoft.NET\FrameworkSDK\Bin\
c:\Program Files\Microsoft Visual Studio .NET\Common7\IDE\
c:\WINNT\Microsoft.NET\Framework\v1.0.3705\
c:\Program Files\Microsoft Visual Studio .NET\Vc7\bin\
c:\Program Files\Dell\OpenManage\oma\bin
c:\Program Files\Dell\OpenManage\LU\bin
c:\Program 

Re: Cygwin Cron on Windows 2003 Server Issues

2004-09-08 Thread Larry Hall
At 02:40 PM 9/8/2004, you wrote:
I can create and start a Cron service under Local System, but I can’t seem to be able 
to have that service run as a different user (ex. cron_server). I tried creating a 
custom user following the directions provided by Corinna Vinschen at 
http://www.mail-archive.com/[EMAIL PROTECTED]/msg31538.html, but it did not resolve 
my problem.

Any suggestions would be greatly appreciated.



Let's start here:

Problem reports:   http://cygwin.com/problems.html

Adding specifics to that, it would be useful to know what you did, where
you saw a problem, and what it was.

You may also want to try 

http://www.cygwin.com/ml/cygwin/2004-07/msg00155.html

before any follow-up post.


--
Larry Hall  http://www.rfk.com
RFK Partners, Inc.  (508) 893-9779 - RFK Office
838 Washington Street   (508) 893-9889 - FAX
Holliston, MA 01746 


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Cygwin Cron on Windows 2003 Server Issues

2004-09-08 Thread Anna Goldberg
We tried running cron_diagnose.sh, but that didn't produce any usefull 
answers, the output we get is:

$ ./cron_diagnose.sh
cron_diagnose.sh 1.5
Your computer does not appear to have a crontab for administrator.
Please generate a crontab for administrator using 'crontab -e',
and run this script again.
The version of cron we have is:
# (Cron version -- $Id: crontab.c,v 1.7 2003/04/15 15:13:41 corinna Exp $)
The error that appears in the Event Viewer when trying to run the service 
is:

Event Type:	Error
Event Source:	cron
Event Category:	None
Event ID:	0
Date:		9/8/2004
Time:		2:36:16 PM
User:		Server Name\service_cron
Computer:	Server Name
Description:
The description for Event ID ( 0 ) in Source ( cron ) cannot be found. The 
local computer may not have the necessary registry information or message 
DLL files to display messages from a remote computer. You may be able to use 
the /AUXSOURCE= flag to retrieve this description; see Help and Support for 
details. The following information is part of the event: cron : PID 2332 : 
starting service `cron' failed: execv: 128, Transport endpoint is not 
connected.

We've created a custom local user account called service_cron and gave it 
the following permissions:
- SeAssignPrimaryTokenPrivilege
- SeCreateTokenPrivilege
- SeIncreaseQuotaPrivilege
- SeServiceLogonRight
and installed the cron service as this user, but we were not able to start 
the service.

Then we removed the cron service and re-installed it under the Local System 
user account, at which time we were able to start the service, but are now 
getting the error listed above when the scheduled task(s) is run.

Let me know if any more information is needed.
Thank you,
~ Anna
_
On the road to retirement? Check out MSN Life Events for advice on how to 
get there! http://lifeevents.msn.com/category.aspx?cid=Retirement

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/


Re: Cygwin Cron on Windows 2003 Server Issues

2004-09-08 Thread Igor Pechtchanski
On Wed, 8 Sep 2004, Anna Goldberg wrote:

 We tried running cron_diagnose.sh, but that didn't produce any usefull
 answers, the output we get is:

 $ ./cron_diagnose.sh
 cron_diagnose.sh 1.5

 Your computer does not appear to have a crontab for administrator.
 Please generate a crontab for administrator using 'crontab -e',
 and run this script again.

 The version of cron we have is:
 # (Cron version -- $Id: crontab.c,v 1.7 2003/04/15 15:13:41 corinna Exp $)

 The error that appears in the Event Viewer when trying to run the service is:

 Event Type:   Error
 Event Source: cron
 Event Category:   None
 Event ID: 0
 Date: 9/8/2004
 Time: 2:36:16 PM
 User: Server Name\service_cron
 Computer: Server Name
 Description:
 The description for Event ID ( 0 ) in Source ( cron ) cannot be found. The
 local computer may not have the necessary registry information or message DLL
 files to display messages from a remote computer. You may be able to use the
 /AUXSOURCE= flag to retrieve this description; see Help and Support for
 details. The following information is part of the event: cron : PID 2332 :
 starting service `cron' failed: execv: 128, Transport endpoint is not
 connected.


 We've created a custom local user account called service_cron and gave it the
 following permissions:
 - SeAssignPrimaryTokenPrivilege
 - SeCreateTokenPrivilege
 - SeIncreaseQuotaPrivilege
 - SeServiceLogonRight
 and installed the cron service as this user, but we were not able to start the
 service.

 Then we removed the cron service and re-installed it under the Local System
 user account, at which time we were able to start the service, but are now
 getting the error listed above when the scheduled task(s) is run.

 Let me know if any more information is needed.

 Thank you,
 ~ Anna

Anna,

What kind of scheduled task produces the above error?  Does the hello
world of crontabs (i.e., /usr/bin/date  /tmp/cron_date 21) run
normally?  If not, please check permissions on /bin and the programs in
/bin -- are they executable by non-owners (i.e., post the output of ls
-l /usr/bin/date.exe)?

Also, please review and follow the Cygwin problem reporting guidelines at
http://cygwin.com/problems.html, particularly the part about *attaching*
(as an uncompressed text *attachment*) the output of cygcheck -svr on
your system.
Igor
-- 
http://cs.nyu.edu/~pechtcha/
  |\  _,,,---,,_[EMAIL PROTECTED]
ZZZzz /,`.-'`'-.  ;-;;,_[EMAIL PROTECTED]
 |,4-  ) )-,_. ,\ (  `'-'   Igor Pechtchanski, Ph.D.
'---''(_/--'  `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

Happiness lies in being privileged to work hard for long hours in doing
whatever you think is worth doing.  -- Dr. Jubal Harshaw

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Cygwin Cron on Windows 2003 Server Issues

2004-09-08 Thread Paul J. Ghosh
Thank you to all who have replied.  Enclosed find the following:

- contents of crontab for user cdaapp - simple task to be
executed every minute for testing
- error encountered when starting cron as service_cron -
includes one as a dialog and another from the event viewer
- test of task to be executed by cron done manually as user
cdaapp which succeeded
- error encountered when successfully starting cron as Local
System but fails when it comes time to execute task - we are aware of
Local System account changes in W2K3 related to setuid and were not
expecting it to work
- long listing of /bin /usr/sbin /var /var/cron /var/cron/tabs -
bin executable by all (755) /var/cron/tabs seems locked down
- parts of /etc/passwd for user cdaapp - tried changing groups
513/544 without any success
- parts of /etc/group

Regards,

Paul J. Ghosh

[EMAIL PROTECTED] /d/opt/cda/bin
$ crontab -e
crontab: no changes made to crontab

*/1 * * * * touch /d/var/log/cda/cron.log

###
error when starting cron as service_cron

Could not start the cron service on Local Computer Error 1067: The
process terminated unexpectedly.

Event Type: Error
Event Source:   cron
Event Category: None
Event ID:   0
Date:   9/8/2004
Time:   11:12:26 PM
User:   DEVAPP1\service_cron
Computer:   DEVAPP1
Description:
The description for Event ID ( 0 ) in Source ( cron ) cannot be found.
The local computer may not have the necessary registry information or
message DLL files to display messages from a remote computer. You may be
able to use the /AUXSOURCE= flag to retrieve this description; see Help
and Support for details. The following information is part of the event:
cron : PID 272 : starting service `cron' failed: execv: 128, Transport
endpoint is not connected.

[EMAIL PROTECTED] ~
$ touch /d/var/log/cda/cron.log

[EMAIL PROTECTED] ~
$ ls -l /d/var/log/cda/cron.log
-rw-r--r--1 cdaapp   Domain U0 Sep  8 23:20
/d/var/log/cda/cron.log

[EMAIL PROTECTED] ~
$ date
Wed Sep  8 23:20:26 CDT 2004

###
error when running cron as Local System

Event Type: Information
Event Source:   /USR/SBIN/CRON
Event Category: None
Event ID:   0
Date:   9/8/2004
Time:   2:30:00 PM
User:   NT AUTHORITY\SYSTEM
Computer:   DEVAPP1
Description:
The description for Event ID ( 0 ) in Source ( /USR/SBIN/CRON ) cannot
be found. The local computer may not have the necessary registry
information or message DLL files to display messages from a remote
computer. You may be able to use the /AUXSOURCE= flag to retrieve this
description; see Help and Support for details. The following information
is part of the event: /USR/SBIN/CRON : PID 3752 : (cdaapp) CMD (touch
/d/var/log/cda/cron.log).

Event Type: Information
Event Source:   /USR/SBIN/CRON
Event Category: None
Event ID:   0
Date:   9/8/2004
Time:   2:30:00 PM
User:   NT AUTHORITY\SYSTEM
Computer:   DEVAPP1
Description:
The description for Event ID ( 0 ) in Source ( /USR/SBIN/CRON ) cannot
be found. The local computer may not have the necessary registry
information or message DLL files to display messages from a remote
computer. You may be able to use the /AUXSOURCE= flag to retrieve this
description; see Help and Support for details. The following information
is part of the event: /USR/SBIN/CRON : PID 3752 : (CRON) error (can't
switch user context).

###
ls -l /bin
total 43133
-rwxr-xr-x+   1 devadm   Users  101888 Aug 19 14:49 a2p.exe
-rwxr-xr-x+   1 devadm   Users   67072 Dec 16  2002 addftinfo.exe
-rwxr-xr-x+   1 devadm   Users8544 Dec 16  2002 afmtodit
-rwxr-xr-x+   1 devadm   Users2442 Mar 22 15:04 apropos
-rwxr-xr-x+   1 devadm   Users8192 Mar 12 22:26 ascii.exe
lrwxrwxrwx1 devadm   Users   8 Sep  1 09:18 awk.exe -
gawk.exe
-rwxr-xr-x+   1 devadm   Users   10240 Mar 22 13:59 b2m.exe
-rwxr-xr-x+   1 devadm   Users   10240 Mar 12 22:26 banner.exe
-rwxr-xr-x+   1 devadm   Users   23552 Jul 24  2003 basename.exe
-rwxr-xr-x+   1 devadm   Users  527360 Oct 20  2003 bash.exe
-rwxr-xr-x+   1 devadm   Users7879 Oct 20  2003 bashbug
-rwxr-xr-x+   1 devadm   Users  204800 Mar  8  2003 bison.exe
-rwxr-xr-x+   1 devadm   Users   82432 Aug  9  2003 bunzip2.exe
-rwxr-xr-x+   1 devadm   Users   57856 Dec 15  2001 byacc.exe
-rwxr-xr-x+   1 devadm   Users   82432 Aug  9  2003 bzcat.exe
lrwxrwxrwx1 devadm   Users   6 Oct  7  2003 bzcmp - bzdiff
-rwxr-xr-x+   1 devadm   Users2105 Aug  9  2003 bzdiff
lrwxrwxrwx1 devadm   Users   6 Oct  7  2003 bzegrep -
bzgrep
lrwxrwxrwx1 devadm   Users   6 Oct  7  2003 bzfgrep -
bzgrep
-rwxr-xr-x+   1 devadm   Users1582 Aug  9  2003 bzgrep