public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* RE: Setting up user mode cron
@ 2002-01-10 11:58 Polley Christopher W
  0 siblings, 0 replies; 12+ messages in thread
From: Polley Christopher W @ 2002-01-10 11:58 UTC (permalink / raw)
  To: cygwin

	You wrote:
	>At 01:45 PM 1/10/2002, Andrew DeFaria wrote:
	>>    Anyway, cron has no access to them. It's running under SYSTEM
	>>    account which has only access to publicly available net
drives, that
	>>    is, drives which are available w/o any form of authentication
	>>    required. 
	>
	><snip>
	>
	>>    No credentials, no authenticated network drive access. That's
it.
	>>
	>>Questions: What is a publicly available net drive? How does one
tell if it is publicly available vs. non publicly >available?
	>
	>I think the above quote from Corinna answers this question.  In
other words,
	>if Windows would ask you to identify yourself if you browsed to
this share
	>as a user the domain doesn't know about, then you'll see a problem
when 
	>trying to use this share with cron (and some other) tools.
	>
	>Someone will correct me if I'm wrong. ;-)

	This seems correct to me, and I would add (or rather expand on how
to become a "user the domain doesn't know about") that to find out what
shares are publicly accessible, you need to log in to your workstation with
unprivileged credentials, for example as \\localmachinedomain\guest (on NT,
use the "User Manager" to see what accounts are defined on your machine).
Accessing a non-public network share will then require you to enter a
domain\userid and password, while a public share will be accessible without
credentials.  I don't know if NT caches userid/password combinations for
network share attempts subsequent to a properly authenticated non-public
share access, so be careful here.

	I have used batch files with NT's AT command and run into the same
problem.  My solution was to put a "net use <drive>: <password>
/user:<domain>\<userid" in the batch file before the share access was
required.  And yes, that leads to the plaintext password security problem,
also (so those scripts didn't last long -- they tended to be one-time
hacks).

	Warm Regards,
	Chris


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Setting up user mode cron
  2002-01-11 10:26 ` Andrew DeFaria
@ 2002-01-11 11:10   ` Corinna Vinschen
  0 siblings, 0 replies; 12+ messages in thread
From: Corinna Vinschen @ 2002-01-11 11:10 UTC (permalink / raw)
  To: cygwin

On Fri, Jan 11, 2002 at 10:19:57AM -0800, Andrew DeFaria wrote:
> >
> >
> >On Thu, Jan 10, 2002 at 10:45:27AM -0800, Andrew DeFaria wrote:
> >
> >>limits" to cron. IOW I guess what I'm saying is that *something* should be 
> >>done (I know you can see this as whining and perhaps it is. But it's 
> >>whining for a good cause! :-)
> >>
> >So, why aren't you going to roll up your sleeves and create a really useful 
> >patch?  
> As soon as I can receive compensation for it! I'm sorry but I don't work 
> for free or at least I do not have the time, resources nor inclination 
> to work for free at this time. You can classify this as whining if  you 
> like :-).
> 
> >>This cron seems to support setting a MAILTO environment variable to tell 
> >>cron where to mail output in case of errors. Could it not simply 
> >>additionally support USERNAME and PASSWD environment variables that, if 
> >>present in the crontab would cause cron to change user context with asking 
> >>for logon credentials? Of course of concern would be the possibly 
> >>cleartext PASSWD. Perhaps PASSWD could be required to be encrypted like 
> >>that usually in bona fide Unix /etc/passwd (/etc/shadow) files. It's just 
> >>a thought of a possible workaround to a possibly bad situation.
> >>
> >You can't encrypt the passwd as in UNIX.  These are asymmetrically
> >encryptions.  You can't get the original passwd back.  Your proposition
> >would need a symmetrically encrypted password which means, the
> >encryption key is either hardcoded in cron (URGH) or it's evaluated
> >by some deterministical function (urgh).  And you would of course
> >need an extra tool to create the encrypted from the cleartext password
> >to allow a user to type it into his/her crontab file.
> >
> OK, let's look at this another way. When one uses POP or IMAP to 
> retrieve email one must authenticate one's username and password to the 
> server to retrieve the email. Therefore somewhere the username and 
> password is stored. For example, when using POP with Netscape to 
> retrieve email from a mail server, Netscape stores the username and 
> password somewhere (a configuration file or the registry). For security, 
> Netscape encrypts the password in some fashion before storing it. When 
> needed Netscape retrieves this information, unencrypts it and sends it 
> along to the mail server so that the user is authenticated and the email 
> is retrieved. Why then can't Cygwin's cron do something similar?

Perhaps because I don't get compensation for it.  I *am* working
on Cygwin as a volunteer as everyone else and I'm sorry to say
that, I'm actually not interested in your problem with cron.
It works for me.  Either someone else is going to contribute
something like that or you can simply forget it.  Full stop.

Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin@cygwin.com
Red Hat, Inc.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Setting up user mode cron
       [not found] <1010742369.28557.ezmlm@cygwin.com>
@ 2002-01-11 10:26 ` Andrew DeFaria
  2002-01-11 11:10   ` Corinna Vinschen
  0 siblings, 1 reply; 12+ messages in thread
From: Andrew DeFaria @ 2002-01-11 10:26 UTC (permalink / raw)
  To: cygwin

>
>
>On Thu, Jan 10, 2002 at 10:45:27AM -0800, Andrew DeFaria wrote:
>
>>limits" to cron. IOW I guess what I'm saying is that *something* should be done (I know you can see this as whining and perhaps it is. But it's whining for a good cause! :-)
>>
>So, why aren't you going to roll up your sleeves and create a really useful patch?  
>
As soon as I can receive compensation for it! I'm sorry but I don't work 
for free or at least I do not have the time, resources nor inclination 
to work for free at this time. You can classify this as whining if  you 
like :-).

>>This cron seems to support setting a MAILTO environment variable to tell cron where to mail output in case of errors. Could it not simply 
>>additionally support USERNAME and PASSWD environment variables that, if present in the crontab would cause cron to change user context with asking for logon credentials? Of course of concern would be the possibly cleartext PASSWD. Perhaps PASSWD could be required to be encrypted like that usually in bona fide Unix /etc/passwd (/etc/shadow) files. It's just a thought of a possible workaround to a possibly bad situation.
>>
>You can't encrypt the passwd as in UNIX.  These are asymmetrically
>encryptions.  You can't get the original passwd back.  Your proposition
>would need a symmetrically encrypted password which means, the
>encryption key is either hardcoded in cron (URGH) or it's evaluated
>by some deterministical function (urgh).  And you would of course
>need an extra tool to create the encrypted from the cleartext password
>to allow a user to type it into his/her crontab file.
>
OK, let's look at this another way. When one uses POP or IMAP to 
retrieve email one must authenticate one's username and password to the 
server to retrieve the email. Therefore somewhere the username and 
password is stored. For example, when using POP with Netscape to 
retrieve email from a mail server, Netscape stores the username and 
password somewhere (a configuration file or the registry). For security, 
Netscape encrypts the password in some fashion before storing it. When 
needed Netscape retrieves this information, unencrypts it and sends it 
along to the mail server so that the user is authenticated and the email 
is retrieved. Why then can't Cygwin's cron do something similar?



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Setting up user mode cron
  2002-01-10 10:45 Andrew DeFaria
  2002-01-10 10:56 ` Larry Hall (RFK Partners, Inc)
@ 2002-01-11  1:02 ` Corinna Vinschen
  1 sibling, 0 replies; 12+ messages in thread
From: Corinna Vinschen @ 2002-01-11  1:02 UTC (permalink / raw)
  To: cygwin

On Thu, Jan 10, 2002 at 10:45:27AM -0800, Andrew DeFaria wrote:
> limits" to cron. IOW I guess what I'm saying is that *something* should 
> be done (I know you can see this as whining and perhaps it is. But it's 
> whining for a good cause! :-)

So, why aren't you going to roll up your sleeves and create a
really useful patch?  That's better than whining, I think.

> This cron seems to support setting a MAILTO environment variable to tell 
> cron where to mail output in case of errors. Could it not simply 
> additionally support USERNAME and PASSWD environment variables that, if 
> present in the crontab would cause cron to change user context with 
> asking for logon credentials? Of course of concern would be the possibly 
> cleartext PASSWD. Perhaps PASSWD could be required to be encrypted like 
> that usually in bona fide Unix /etc/passwd (/etc/shadow) files. It's 
> just a thought of a possible workaround to a possibly bad situation.

You can't encrypt the passwd as in UNIX.  These are asymmetrically
encryptions.  You can't get the original passwd back.  Your proposition
would need a symmetrically encrypted password which means, the
encryption key is either hardcoded in cron (URGH) or it's evaluated
by some deterministical function (urgh).  And you would of course
need an extra tool to create the encrypted from the cleartext password
to allow a user to type it into his/her crontab file.

Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin@cygwin.com
Red Hat, Inc.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Setting up user mode cron
  2002-01-10 10:45 Andrew DeFaria
@ 2002-01-10 10:56 ` Larry Hall (RFK Partners, Inc)
  2002-01-11  1:02 ` Corinna Vinschen
  1 sibling, 0 replies; 12+ messages in thread
From: Larry Hall (RFK Partners, Inc) @ 2002-01-10 10:56 UTC (permalink / raw)
  To: Andrew DeFaria, cygwin

At 01:45 PM 1/10/2002, Andrew DeFaria wrote:
>    Anyway, cron has no access to them. It's running under SYSTEM
>    account which has only access to publicly available net drives, that
>    is, drives which are available w/o any form of authentication
>    required. 

<snip>

>    No credentials, no authenticated network drive access. That's it.
>
>Questions: What is a publicly available net drive? How does one tell if it is publicly available vs. non publicly available?

I think the above quote from Corinna answers this question.  In other words,
if Windows would ask you to identify yourself if you browsed to this share
as a user the domain doesn't know about, then you'll see a problem when 
trying to use this share with cron (and some other) tools.

Someone will correct me if I'm wrong. ;-)


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


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Setting up user mode cron
@ 2002-01-10 10:45 Andrew DeFaria
  2002-01-10 10:56 ` Larry Hall (RFK Partners, Inc)
  2002-01-11  1:02 ` Corinna Vinschen
  0 siblings, 2 replies; 12+ messages in thread
From: Andrew DeFaria @ 2002-01-10 10:45 UTC (permalink / raw)
  To: cygwin


    Anyway, cron has no access to them. It's running under SYSTEM
    account which has only access to publicly available net drives, that
    is, drives which are available w/o any form of authentication
    required. The forked cron jobs are running in the same logon session
    even if they are running under another user account. Keep in mind
    that the user context has been changed w/o asking for logon
    credentials. This is different from what the native Windows
    scheduler does (which requires entering the password). No
    credentials, no authenticated network drive access. That's it.

Questions: What is a publicly available net drive? How does one tell if 
it is publicly available vs. non publicly available?

For example, I can run //sonscentral/common/clearcase/bin/update_view 
but I cannot run //sonscentral/users/adefaria/bin/update_view. I suspect 
the former is publicly available while the latter is not publicly 
available but I'd like to know how I tell the difference.

Seems to me that this is a major stumbling block for cron that severely 
limits it's usefulness. Given that Cygwin does not have su capability 
and login doesn't work from a shell (only for telnet, rlogin stuff) 
there appears to be no way for cron to effectively, really switch to 
another user's credentials such that a user mode cron is truly available 
and useful. It is not uncommon to have user's home directories on a 
network share. It is also very natural for users to have scripts to 
perform functions and want to schedule such functions via cron as well 
as to perhaps log output from such scripts to "natural" places like the 
user's home directory which would be a "network place" therefore "off 
limits" to cron. IOW I guess what I'm saying is that *something* should 
be done (I know you can see this as whining and perhaps it is. But it's 
whining for a good cause! :-)

This cron seems to support setting a MAILTO environment variable to tell 
cron where to mail output in case of errors. Could it not simply 
additionally support USERNAME and PASSWD environment variables that, if 
present in the crontab would cause cron to change user context with 
asking for logon credentials? Of course of concern would be the possibly 
cleartext PASSWD. Perhaps PASSWD could be required to be encrypted like 
that usually in bona fide Unix /etc/passwd (/etc/shadow) files. It's 
just a thought of a possible workaround to a possibly bad situation.



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Setting up user mode cron
  2002-01-09 19:29       ` Andrew DeFaria
@ 2002-01-10  4:34         ` Corinna Vinschen
  0 siblings, 0 replies; 12+ messages in thread
From: Corinna Vinschen @ 2002-01-10  4:34 UTC (permalink / raw)
  To: cygwin

On Wed, Jan 09, 2002 at 07:29:50PM -0800, Andrew DeFaria wrote:
>  Larry Hall (RFK Partners, Inc) wrote:
> 
> >OK, yes all your mounts are system.  Looking back over your original 
> >comments, what doesn't work again?  You seem to indicate that cron is 
> >running.  The output you show indicates it did run.  But you claim it 
> >didn't run a script.  How did you determine that?  Perhaps you're 
> >interpreting the fact that you're having problems accessing the network 
> >share as a cron script execution problem?
> >
> OK let's scale back a little bit. The situation is that I would like to 
> run cron on my desktop and by extension allow my users to run their own 
> crons on their desktop. We're in a domain and as such we have set it up 
> such that people's home directories are mounted on /home from the 
> Windows server that houses the home directories. Therefore we have the 
> following mount:
> 
> \\sonscentral\users on /home type system (textmode).
> 
> Given my username, adefaria, therefore ls /home/adefaria (or ls ~) will 
> list the contents of \\sonscentral\users\adefaria. Note there are no 
> mapped drives here, just UNC names.

Anyway, cron has no access to them.  It's running under SYSTEM account
which has only access to publically available net drives, that is,
drives which are available w/o any form of authentication required.
The forked cron jobs are running in the same logon session even if they
are running under another user account.  Keep in mind that the user
context has been changed w/o asking for logon credentials.  This is
different from what the native Windows scheduler does (which requires
entering the password).  No credentials, no authenticated network drive
access.  That's it.

Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin@cygwin.com
Red Hat, Inc.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Setting up user mode cron
  2002-01-09 16:56     ` Larry Hall (RFK Partners, Inc)
@ 2002-01-09 19:29       ` Andrew DeFaria
  2002-01-10  4:34         ` Corinna Vinschen
  0 siblings, 1 reply; 12+ messages in thread
From: Andrew DeFaria @ 2002-01-09 19:29 UTC (permalink / raw)
  To: Larry Hall (RFK Partners, Inc); +Cc: cygwin, Andrew DeFaria

  Larry Hall (RFK Partners, Inc) wrote:

>OK, yes all your mounts are system.  Looking back over your original comments, what doesn't work again?  You seem to indicate that cron is running.  The output you show indicates it did run.  But you claim it didn't run a script.  How did you determine that?  Perhaps you're interpreting the fact that you're having problems accessing the network share as a cron script execution problem?
>
OK let's scale back a little bit. The situation is that I would like to 
run cron on my desktop and by extension allow my users to run their own 
crons on their desktop. We're in a domain and as such we have set it up 
such that people's home directories are mounted on /home from the 
Windows server that houses the home directories. Therefore we have the 
following mount:

\\sonscentral\users on /home type system (textmode).

Given my username, adefaria, therefore ls /home/adefaria (or ls ~) will 
list the contents of \\sonscentral\users\adefaria. Note there are no 
mapped drives here, just UNC names.

So when I set up cron I expect that when a cronjob is running for me 
(adefaria) that I am in /home/adefaria (effectively on 
\\sonscentral\users\adefarai) and I'm running as the user adefaria. And 
I am. As my cronjobs told me I am adefaria and my CWD is /home/adefaria. 
Problem is that if I do an ls (outputting to /tmp/cron.log) I see 
nothing. Further more if I execute foo where foo is /home/adefaria/foo 
and let's say foo does merely an

echo "Foo executed on $(date)" >> /tmp/cron.log

I do not see /tmp/cron.log updated with that echo. Instead I get email 
saying "foo: not found". I also tried /home/adefaria/foo as well as 
//sonscentral/users/adefaria/foo (got email saying /home/adefaria/foo 
not found, etc).

Moving foo to /tmp/foo works however changing the echo to attempt to 
write ~/cron.log reveals permission denied when trying to write to that 
file. Ah ha! Getting somewhere. Apparently cron cannot deal with a 
network place be it a mapped drive of a Cygwin mounted UNC path.

>>>>Executing this script from the command line yeilds:
>>>>
>>>>$ /tmp/update_view defaria
>>>>update_view: Warning: View pname does not exist: defaria
>>>>
>>>>View pnames should be UNC names that lead to the top of the view
>>>>For example: //sons-clearcase/Views/<viewname>
>>>>
>>>I believe you need to alter the permissions of the 'SYSTEM' account so that it can access the network.  
>>>
>>What "network" am I accessing when I try to run /tmp/update_view? It's my
>>
>
>Good question.  Using your example above, //sons-clearcase/Views/<viewname>.  That's what I'm assuming lacking any other information from you.
>
Well that would be the parameter for the script update_view. IOW is 
should read something like

$ /tmp/update_view //sons-clearcase/Views/defaria

Otherwise the script will just echo out the error message you see.

Found out that my /tmp/update_view lacked execute bits and that was why 
cron couldn't "find" it. Turning on the execute bits makes it run 
however, like we've seen here, any references to network areas causes 
problems. Anybody know why cron can't deal with network locations?

>> understanding that /tmp is local. Of course my home directory is on the network. Is that what you mean? Anyhow, how do I alter the permissions of
>>
>Assuming you're trying to access your home directory in your script, yes.
>
Yes, apparently cron is running the job as me but this "me" doesn't have 
permissions to access network stuff.

>> "SYSTEM" account so that it can access the network. What I have in my /etc/passwd is:
>>
>>$ grep -i system /etc/passwd
>>SYSTEM:*:18:18:,S-1-5-18::
>>
>>>I might be wrong on this.  Check the email archives for similar discussions on cron.  This *has* come up before.
>>>
>>I had checked and read a lot about cron in the archives before this. I didn't see anything that explained it. I saw stuff saying that cron cannot access network drives. Does this also mean that cron cannot access network mount points say like when you mount /mnt/share //<server>/<share>? Does it main you cannot then run /mnt/share/myscript?
>>
>
>Yep, network drives are a no-no.  If this is how you're trying to access the network, then that's your problem.  Try using the UNC paths directly. If that doesn't work, I can only point you to the mail archives.  I remember this being discussed and my recollection is the solution was 'use UNC paths'.  But my memory could be wrong.  Perhaps someone else's memory is clearer on this subject.
>
Sorry, I didn't equate a, say Z Drive accessed through /cygdrive/z as 
the same thing as a mount /mnt/sharedscripts //<server>/<script dir>.

>> Or does it mean if your home directory happens to be /mnt/share/home/<me> then I can't run anything including /tmp/myscript?!?
>>
>>Another, cron related problem. On my Windows 2000 server I tried to set up cron:
>>
>>$ cygrunsrv -I cron -p /usr/sbin/cron -a D -e "CYGWIN=ntsec"
>>$ cygrunsrv -S cron
>>cygrunsrv: Error starting a service: QueryServiceStatus:  Win32 error 1062:
>>The service has not been started.
>>
>>Any ideas?
>>
>At the moment, no.
>
Damn! I wish I could figure this out. Perhaps somebody else will chime in...





--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Setting up user mode cron
  2002-01-09 15:25   ` Andrew DeFaria
@ 2002-01-09 16:56     ` Larry Hall (RFK Partners, Inc)
  2002-01-09 19:29       ` Andrew DeFaria
  0 siblings, 1 reply; 12+ messages in thread
From: Larry Hall (RFK Partners, Inc) @ 2002-01-09 16:56 UTC (permalink / raw)
  To: Andrew DeFaria; +Cc: cygwin

At 06:25 PM 1/9/2002, Andrew DeFaria wrote:
>Larry Hall (RFK Partners, Inc) wrote:
>
>>At 05:06 PM 1/9/2002, Andrew DeFaria wrote:
>>
>>>I've set up cron on my desktop according to /usr/doc/Cygwin/cron.README which states I should:
>>>
>>>$ cygrunsrv -I cron -p /usr/sbin/cron -a D -e "CYGWIN=ntsec"
>>>$ cygrunsrv -S cron
>>>
>>>And I have the following crontab installed:
>>>
>>>15 * * * * echo -e "Debugging cron $(date)\n"                >  
>>>/tmp/cron.log
>>>16 * * * * echo -e "Working directory:\n\n$(pwd)\n"          >> /tmp/cron.log
>>>17 * * * * echo -e "ID info:\n\n$(id)\n"                     >> /tmp/cron.log
>>>18 * * * * echo -e "Directory listing:\n\n$(ls)\n"           >> /tmp/cron.log
>>>19 * * * * echo -e "Script file:\n\n$(ls /tmp/update_view)\n" >> /tmp/cron.log
>>>20 * * * * echo -e "Executing: /tmp/update_view defaria"     >> /tmp/cron.log
>>>21 * * * * /tmp/update_view defaria                          >> /tmp/cron.log
>>>
>>>The resulting output is:
>>>
>>>Debugging cron Wed Jan  9 13:15:01  2002
>>>
>>>Working directory:
>>>
>>>/home/adefaria
>>>
>>>ID info:
>>>
>>>uid=1370(adefaria) gid=513(Domain Users) groups=0(Everyone),512(Domain Admins),513(Domain Users),1170(Everybody),1382(ITSupport)
>>>
>>>Directory listing:
>>>
>>>
>>>
>>>Script file:
>>>
>>>/tmp/update_view
>>>
>>>Executing: /tmp/update_view defaria
>>>
>>>It seems like cron works OK and runs as me in my home directory but I cannot access nor run any scripts! Not even in /tmp! Why?
>>
>>
>>Did you choose to mount '/' as 'user' rather than 'system' during the install?  Check the output of 'mount' to find out.
>No I didn't do any mounting of '/' as 'user" that I can see:
>
>$ mount
>\\sons-mrp\LJ45500-Color on /dev/LJ45500-Color type system (binmode)
>\\sons-clearcase\views on /view type system (textmode)
>\\sons-mrp\LJ4050PCL6 on /dev/LJ4050PCL6 type system (binmode)
>\\sonscentral\users on /home type system (textmode)
>\\sons-mrp\LJ8150 on /dev/LJ8150 type system (binmode)
>\\sons-mrp\LJ8150 on /dev/lp type system (binmode)
>C:\Cygwin\bin on /usr/bin type system (binmode)
>C:\Cygwin\lib on /usr/lib type system (binmode)
>C:\Cygwin on / type system (binmode)
>c: on /dev/c type system (textmode,noumount)
>g: on /dev/g type system (textmode,noumount)
>h: on /dev/h type system (textmode,noumount)
>q: on /dev/q type system (textmode,noumount)
>t: on /dev/t type system (textmode,noumount)


OK, yes all your mounts are system.  Looking back over your original 
comments, what doesn't work again?  You seem to indicate that cron is 
running.  The output you show indicates it did run.  But you claim it
didn't run a script.  How did you determine that?  Perhaps you're 
interpreting the fact that you're having problems accessing the network
share as a cron script execution problem?


>>>Executing this script from the command line yeilds:
>>>
>>>$ /tmp/update_view defaria
>>>update_view: Warning: View pname does not exist: defaria
>>>
>>>View pnames should be UNC names that lead to the top of the view
>>>For example: //sons-clearcase/Views/<viewname>
>>
>>I believe you need to alter the permissions of the 'SYSTEM' account so that it can access the network.  
>What "network" am I accessing when I try to run /tmp/update_view? It's my


Good question.  Using your example above, 
//sons-clearcase/Views/<viewname>.  That's what I'm assuming lacking any
other information from you.


>  understanding that /tmp is local. Of course my home directory is on the network. Is that what you mean? Anyhow, how do I alter the permissions of


Assuming you're trying to access your home directory in your script, yes.


>  "SYSTEM" account so that it can access the network. What I have in my /etc/passwd is:
>
>$ grep -i system /etc/passwd
>SYSTEM:*:18:18:,S-1-5-18::
>
>>I might be wrong on this.  Check the email archives for similar discussions on cron.  This *has* come up before.
>I had checked and read a lot about cron in the archives before this. I didn't see anything that explained it. I saw stuff saying that cron cannot access network drives. Does this also mean that cron cannot access network mount points say like when you mount /mnt/share //<server>/<share>? Does it main you cannot then run /mnt/share/myscript?


Yep, network drives are a no-no.  If this is how you're trying to access
the network, then that's your problem.  Try using the UNC paths directly.
If that doesn't work, I can only point you to the mail archives.  I 
remember this being discussed and my recollection is the solution was 
'use UNC paths'.  But my memory could be wrong.  Perhaps someone else's
memory is clearer on this subject.


>  Or does it mean if your home directory happens to be /mnt/share/home/<me> then I can't run anything including /tmp/myscript?!?
>
>Another, cron related problem. On my Windows 2000 server I tried to set up cron:
>
>$ cygrunsrv -I cron -p /usr/sbin/cron -a D -e "CYGWIN=ntsec"
>$ cygrunsrv -S cron
>cygrunsrv: Error starting a service: QueryServiceStatus:  Win32 error 1062:
>The service has not been started.
>
>Any ideas?



At the moment, no.

Sorry.



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


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Setting up user mode cron
  2002-01-09 14:29 ` Larry Hall (RFK Partners, Inc)
@ 2002-01-09 15:25   ` Andrew DeFaria
  2002-01-09 16:56     ` Larry Hall (RFK Partners, Inc)
  0 siblings, 1 reply; 12+ messages in thread
From: Andrew DeFaria @ 2002-01-09 15:25 UTC (permalink / raw)
  To: Larry Hall (RFK Partners, Inc); +Cc: cygwin

Larry Hall (RFK Partners, Inc) wrote:

>At 05:06 PM 1/9/2002, Andrew DeFaria wrote:
>
>>I've set up cron on my desktop according to /usr/doc/Cygwin/cron.README which states I should:
>>
>>$ cygrunsrv -I cron -p /usr/sbin/cron -a D -e "CYGWIN=ntsec"
>>$ cygrunsrv -S cron
>>
>>And I have the following crontab installed:
>>
>>15 * * * * echo -e "Debugging cron $(date)\n"                >  
>>/tmp/cron.log
>>16 * * * * echo -e "Working directory:\n\n$(pwd)\n"          >> /tmp/cron.log
>>17 * * * * echo -e "ID info:\n\n$(id)\n"                     >> /tmp/cron.log
>>18 * * * * echo -e "Directory listing:\n\n$(ls)\n"           >> /tmp/cron.log
>>19 * * * * echo -e "Script file:\n\n$(ls /tmp/update_view)\n" >> /tmp/cron.log
>>20 * * * * echo -e "Executing: /tmp/update_view defaria"     >> /tmp/cron.log
>>21 * * * * /tmp/update_view defaria                          >> /tmp/cron.log
>>
>>The resulting output is:
>>
>>Debugging cron Wed Jan  9 13:15:01  2002
>>
>>Working directory:
>>
>>/home/adefaria
>>
>>ID info:
>>
>>uid=1370(adefaria) gid=513(Domain Users) groups=0(Everyone),512(Domain Admins),513(Domain Users),1170(Everybody),1382(ITSupport)
>>
>>Directory listing:
>>
>>
>>
>>Script file:
>>
>>/tmp/update_view
>>
>>Executing: /tmp/update_view defaria
>>
>>It seems like cron works OK and runs as me in my home directory but I cannot access nor run any scripts! Not even in /tmp! Why?
>>
>
>
>Did you choose to mount '/' as 'user' rather than 'system' during the install?  Check the output of 'mount' to find out.
>
No I didn't do any mounting of '/' as 'user" that I can see:

$ mount
\\sons-mrp\LJ45500-Color on /dev/LJ45500-Color type system (binmode)
\\sons-clearcase\views on /view type system (textmode)
\\sons-mrp\LJ4050PCL6 on /dev/LJ4050PCL6 type system (binmode)
\\sonscentral\users on /home type system (textmode)
\\sons-mrp\LJ8150 on /dev/LJ8150 type system (binmode)
\\sons-mrp\LJ8150 on /dev/lp type system (binmode)
C:\Cygwin\bin on /usr/bin type system (binmode)
C:\Cygwin\lib on /usr/lib type system (binmode)
C:\Cygwin on / type system (binmode)
c: on /dev/c type system (textmode,noumount)
g: on /dev/g type system (textmode,noumount)
h: on /dev/h type system (textmode,noumount)
q: on /dev/q type system (textmode,noumount)
t: on /dev/t type system (textmode,noumount)

>>Executing this script from the command line yeilds:
>>
>>$ /tmp/update_view defaria
>>update_view: Warning: View pname does not exist: defaria
>>
>>View pnames should be UNC names that lead to the top of the view
>>For example: //sons-clearcase/Views/<viewname>
>>
>
>I believe you need to alter the permissions of the 'SYSTEM' account so that it can access the network.  
>
What "network" am I accessing when I try to run /tmp/update_view? It's 
my understanding that /tmp is local. Of course my home directory is on 
the network. Is that what you mean? Anyhow, how do I alter the 
permissions of "SYSTEM" account so that it can access the network. What 
I have in my /etc/passwd is:

$ grep -i system /etc/passwd
SYSTEM:*:18:18:,S-1-5-18::

>I might be wrong on this.  Check the email archives for similar discussions on cron.  This *has* come up before.
>
I had checked and read a lot about cron in the archives before this. I 
didn't see anything that explained it. I saw stuff saying that cron 
cannot access network drives. Does this also mean that cron cannot 
access network mount points say like when you mount /mnt/share 
//<server>/<share>? Does it main you cannot then run 
/mnt/share/myscript? Or does it mean if your home directory happens to 
be /mnt/share/home/<me> then I can't run anything including /tmp/myscript?!?

Another, cron related problem. On my Windows 2000 server I tried to set 
up cron:

$ cygrunsrv -I cron -p /usr/sbin/cron -a D -e "CYGWIN=ntsec"
$ cygrunsrv -S cron
cygrunsrv: Error starting a service: QueryServiceStatus:  Win32 error 1062:
The service has not been started.

Any ideas?


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Setting up user mode cron
  2002-01-09 14:06 Andrew DeFaria
@ 2002-01-09 14:29 ` Larry Hall (RFK Partners, Inc)
  2002-01-09 15:25   ` Andrew DeFaria
  0 siblings, 1 reply; 12+ messages in thread
From: Larry Hall (RFK Partners, Inc) @ 2002-01-09 14:29 UTC (permalink / raw)
  To: Andrew DeFaria, cygwin; +Cc: Andrew DeFaria

At 05:06 PM 1/9/2002, Andrew DeFaria wrote:
>I've set up cron on my desktop according to /usr/doc/Cygwin/cron.README which states I should:
>
>$ cygrunsrv -I cron -p /usr/sbin/cron -a D -e "CYGWIN=ntsec"
>$ cygrunsrv -S cron
>
>And I have the following crontab installed:
>
>15 * * * * echo -e "Debugging cron $(date)\n"                >  
>/tmp/cron.log
>16 * * * * echo -e "Working directory:\n\n$(pwd)\n"          >> /tmp/cron.log
>17 * * * * echo -e "ID info:\n\n$(id)\n"                     >> /tmp/cron.log
>18 * * * * echo -e "Directory listing:\n\n$(ls)\n"           >> /tmp/cron.log
>19 * * * * echo -e "Script file:\n\n$(ls /tmp/update_view)\n" >> /tmp/cron.log
>20 * * * * echo -e "Executing: /tmp/update_view defaria"     >> /tmp/cron.log
>21 * * * * /tmp/update_view defaria                          >> /tmp/cron.log
>
>The resulting output is:
>
>Debugging cron Wed Jan  9 13:15:01  2002
>
>Working directory:
>
>/home/adefaria
>
>ID info:
>
>uid=1370(adefaria) gid=513(Domain Users) groups=0(Everyone),512(Domain Admins),513(Domain Users),1170(Everybody),1382(ITSupport)
>
>Directory listing:
>
>
>
>Script file:
>
>/tmp/update_view
>
>Executing: /tmp/update_view defaria
>
>It seems like cron works OK and runs as me in my home directory but I cannot access nor run any scripts! Not even in /tmp! Why?


Did you choose to mount '/' as 'user' rather than 'system' during the
install?  Check the output of 'mount' to find out.


>Executing this script from the command line yeilds:
>
>$ /tmp/update_view defaria
>update_view: Warning: View pname does not exist: defaria
>
>View pnames should be UNC names that lead to the top of the view
>For example: //sons-clearcase/Views/<viewname>


I believe you need to alter the permissions of the 'SYSTEM' account so 
that it can access the network.  I might be wrong on this.  Check the 
email archives for similar discussions on cron.  This *has* come up 
before.





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


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Setting up user mode cron
@ 2002-01-09 14:06 Andrew DeFaria
  2002-01-09 14:29 ` Larry Hall (RFK Partners, Inc)
  0 siblings, 1 reply; 12+ messages in thread
From: Andrew DeFaria @ 2002-01-09 14:06 UTC (permalink / raw)
  To: cygwin; +Cc: Andrew DeFaria

I've set up cron on my desktop according to /usr/doc/Cygwin/cron.README 
which states I should:

$ cygrunsrv -I cron -p /usr/sbin/cron -a D -e "CYGWIN=ntsec"
$ cygrunsrv -S cron

And I have the following crontab installed:

15 * * * * echo -e "Debugging cron $(date)\n"                >  
/tmp/cron.log
16 * * * * echo -e "Working directory:\n\n$(pwd)\n"          >> 
/tmp/cron.log
17 * * * * echo -e "ID info:\n\n$(id)\n"                     >> 
/tmp/cron.log
18 * * * * echo -e "Directory listing:\n\n$(ls)\n"           >> 
/tmp/cron.log
19 * * * * echo -e "Script file:\n\n$(ls /tmp/update_view)\n" >> 
/tmp/cron.log
20 * * * * echo -e "Executing: /tmp/update_view defaria"     >> 
/tmp/cron.log
21 * * * * /tmp/update_view defaria                          >> 
/tmp/cron.log

The resulting output is:

Debugging cron Wed Jan  9 13:15:01  2002

Working directory:

/home/adefaria

ID info:

uid=1370(adefaria) gid=513(Domain Users) groups=0(Everyone),512(Domain 
Admins),513(Domain Users),1170(Everybody),1382(ITSupport)

Directory listing:



Script file:

/tmp/update_view

Executing: /tmp/update_view defaria

It seems like cron works OK and runs as me in my home directory but I 
cannot access nor run any scripts! Not even in /tmp! Why?

Executing this script from the command line yeilds:

$ /tmp/update_view defaria
update_view: Warning: View pname does not exist: defaria

View pnames should be UNC names that lead to the top of the view
For example: //sons-clearcase/Views/<viewname>

Finally I received an email from cron that stated simply 
"/tmp/update_view: not found". So then, how does one set up cron such 
that one can use it to run scripts?



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2002-01-11 19:09 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-01-10 11:58 Setting up user mode cron Polley Christopher W
     [not found] <1010742369.28557.ezmlm@cygwin.com>
2002-01-11 10:26 ` Andrew DeFaria
2002-01-11 11:10   ` Corinna Vinschen
  -- strict thread matches above, loose matches on Subject: below --
2002-01-10 10:45 Andrew DeFaria
2002-01-10 10:56 ` Larry Hall (RFK Partners, Inc)
2002-01-11  1:02 ` Corinna Vinschen
2002-01-09 14:06 Andrew DeFaria
2002-01-09 14:29 ` Larry Hall (RFK Partners, Inc)
2002-01-09 15:25   ` Andrew DeFaria
2002-01-09 16:56     ` Larry Hall (RFK Partners, Inc)
2002-01-09 19:29       ` Andrew DeFaria
2002-01-10  4:34         ` Corinna Vinschen

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