X-Spam-Check-By: sourceware.org Message-ID: <5378a6d40610200614m53eef9f8uc57cd6a6c346aebe@mail.gmail.com> Date: Fri, 20 Oct 2006 09:14:36 -0400 From: "Mark Schubert" Reply-To: Mark DOT Schubert AT gmail DOT com To: cygwin AT cygwin DOT com Subject: Re: 1.5.21-1:Windows 2003 Server & Cygwin Cron In-Reply-To: <5378a6d40610111125tafbf553m263c2bf48a3a70b@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <5378a6d40610111125tafbf553m263c2bf48a3a70b AT mail DOT gmail DOT com> Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Unsubscribe: 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 Update - cron works when start it manually from cron_server account - cron_server AT mcspd-b ~ $ /usr/sbin/cron It runs crontabs from all different accounts.The problem is I need to have it start as a service so when the machine boots, it will run. I've tried every which way under the sun to start it as a service - not gonna happen! (without help) I've tried to start it as sshd_server, cron_server etc... notta. cygrunsrv -I cron -p /usr/sbin/cron -a -D -u cron_server -w cygrunsrv -I cron -p /usr/sbin/cron -a -D -u sshd_server -w I tried w/quotes (both single and double) around the -D - doesn't matter. seems like it doesn't like my password - but I'm not sure. I've deleted and re-created the cron_server account a number of times as both "mark" and Administrator - same problem. Mark. On 10/11/06, Mark Schubert wrote: > I do not have a problem to get cron to start - but it flat doesn't work. > > I've started/configured it to start every way I've seen so far (except > the "wrappers") stuff - I don't see how that could help... > > I've read a TON of information provided by Ms. Vinschen - and I am > still not able to get cron to execute a crontab entry.. > Here is my latest attempt: (all commands entered by user:mark unless > otherwise specified - mark is in group Administrators) > > # configure cron Win2003 Server > net user cron_server /add /yes > net localgroup Administrators cron_server /add > editrights -a SeAssignPrimaryTokenPrivilege -u cron_server > editrights -a SeCreateTokenPrivilege -u cron_server > editrights -a SeIncreaseQuotaPrivilege -u cron_server > editrights -a SeServiceLogonRight -u cron_server > mkpasswd -l -u cron_server >> /etc/passwd > --- all these work fine... Then, I did the following... > > For security reasons: > editrights -a SeDenyInteractiveLogonRight -u cron_server > editrights -a SeDenyNetworkLogonRight -u cron_server > editrights -a SeDenyRemoteInteractiveLogonRight -u cron_server > > --- At this point, no problems... > cygrunsrv -I cron -p /usr/sbin/cron -a -D -u cron_server -w > > mark AT mcspd-a ~ > $ net start cron > The cron service is starting. > The cron service could not be started. > > The service did not report an error. > > More help is available by typing NET HELPMSG 3534. > > The "net start cron" failed - so, I did this. > > editrights -r SeDenyInteractiveLogonRight -u cron_server > editrights -r SeDenyNetworkLogonRight -u cron_server > editrights -r SeDenyRemoteInteractiveLogonRight -u cron_server > > ssh cron_server AT localhost (because su doesn't work) > cron_server>cygrunsrv -R cron > cron_server>rm -f /var/run/cron.pid > cron_server>cygrunsrv -I cron -p /usr/sbin/cron -a -D > cron_server>net start cron > The cron service is starting. > The cron service was started successfully. > > cron_server>ps -aef > cron_server AT mcspd-a ~ > $ ps -aef > UID PID PPID TTY STIME COMMAND > sshd_ser 1484 1 ? 20:26:19 /usr/bin/cygrunsrv > sshd_ser 1500 1484 ? 20:26:19 /usr/sbin/sshd > webmon 3624 2240 ? 10:06:04 > mark 4768 1 con 20:37:07 /usr/bin/rxvt > mark 4808 4768 1 20:37:07 /usr/bin/bash > webmon 3880 3916 ? 08:16:04 > sshd_ser 4720 1500 ? 13:54:05 /usr/sbin/sshd > mark 4416 4720 3 13:54:06 /usr/bin/bash > mark 6056 4416 3 13:59:19 /usr/bin/ssh > sshd_ser 3796 1500 ? 13:59:19 /usr/sbin/sshd > cron_ser 3704 3796 4 13:59:22 /usr/bin/bash > sshd_ser 1792 1500 ? 14:00:24 /usr/sbin/sshd > mark 5460 1792 5 14:00:25 /usr/bin/bash > sshd_ser 4596 1500 ? 17:35:18 /usr/sbin/sshd > mark 5264 4596 7 17:35:19 /usr/bin/bash > mark 868 5460 5 17:37:13 /usr/bin/ssh > sshd_ser 664 1500 ? 17:37:13 /usr/sbin/sshd > Administ 4652 664 6 17:37:16 /usr/bin/bash > SYSTEM 1612 1 ? 18:01:08 /usr/bin/cygrunsrv > SYSTEM 4120 1612 ? 18:01:08 /usr/sbin/cron > cron_ser 5656 3704 4 18:01:38 /usr/bin/ps > > cron_server>cron_diagnose.sh > cron_diagnose.sh 1.7 > > This script did not find any errors in your crontab setup. > > cron_server AT mcspd-a ~ > cron_server>crontab -l > # DO NOT EDIT THIS FILE - edit the master and reinstall. > # (/tmp/crontab.5292 installed on Wed Oct 11 18:05:28 2006) > # (Cron version -- $Id: crontab.c,v 1.8 2004/12/21 16:14:41 corinna Exp $) > * * * * * rm ~/this > * * * * * date > /home/cron_server/date.txt > > $ ls -la > total 36 > drwxrwxrwx+ 4 cron_server None 0 Oct 11 18:05 . > drwxrwxrwx+ 6 mark None 0 Oct 11 13:59 .. > -rwxr-xr-x 1 cron_server None 1150 Aug 28 15:07 .bash_profile > -rwxr-xr-x 1 cron_server None 3116 Aug 28 15:07 .bashrc > -rwxr-xr-x 1 cron_server None 1461 Aug 28 15:07 .inputrc > drwx------+ 2 cron_server None 0 Oct 11 18:04 .ssh > drwxrwxrwx+ 3 cron_server None 0 Oct 11 15:31 WINDOWS > -rw-r--r-- 1 cron_server None 23875 Oct 11 18:03 cygcheck.txt > -rw-r--r-- 1 cron_server None 0 Oct 11 14:16 this > > (no date.txt and still see "this") > > mark AT mcspd-a ~ > ls -la /var/cron/tabs/ > total 4 > drwxrwxrwt+ 2 mark Users 0 Oct 11 17:38 . > drwxrwxrwt+ 3 mark Users 0 Aug 28 15:07 .. > -rw-r----- 1 Administrator root 212 Oct 11 17:38 Administrator > -rw-r----- 1 cron_server SYSTEM 212 Oct 11 14:16 cron_server > -rw-r----- 1 mark root 212 Oct 11 16:06 mark > -rw-r----- 1 webmon root 363 Oct 10 20:27 webmon > > $ uname -a > CYGWIN_NT-5.2 mcspd-a 1.5.21(0.156/4/2) 2006-07-30 14:21 i686 Cygwin > > the webmon crontab executes a script - it doesn't fire either. All of > these crontabs work on WinXP/Cygwin - and that's w/me (mark) running > cron > > On this Win2003 Server SE box - I can get cron to start in a number of > accounts - but it never fires a cron job. > > Please help!? > > THANKS VERY MUCH in adv! > > Mark. > > > -- 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/