public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: David Rothenberger <daveroth@acm.org>
To: Louis-Luc Le Guerrier <leguerri@IRO.UMontreal.CA>
Cc: cygwin@cygwin.com
Subject: Re: Need help: cron jobs can't access network drives.
Date: Tue, 09 Sep 2003 19:24:00 -0000	[thread overview]
Message-ID: <3F5E28F5.6070200@acm.org> (raw)
In-Reply-To: <Pine.LNX.4.44.0309091246140.27357-100000@vor.iro.umontreal.ca>

Louis-Luc Le Guerrier wrote:

> On Tue, 2 Sep 2003, David Rothenberger wrote:
> 
> 
>>Louis-Luc Le Guerrier wrote:
>>
>>>Hello,
>>>I have tried Universal Name Convention path as well, and I still can't
>>>access the network drives, even with UNC paths inside the script ran by
>>>'cron'. The same script invoked  manually accesses net drives of course.
>>>
>>>I have looked at "www.denicomp.com/faq.htm#Q21" and understand partially
>>>what they mean to do, but they don't explicitly explain how to perform
>>>the tasks in Windows.
>>
>>That page explains that to access a network share that requires user 
>>authentication, Windows needs a password, which isn't available to cron.
>>
>>For example, cron, running as the SYSTEM user, runs a job for 
>>Administrator.  It switches to the Administrator user to run the job, 
>>which tries to access a network share.  This share's permissions require 
>>the Administrator user to authenticate by providing the correct 
>>password.  But, cron has no such password, so the access fails.
>>
>>You should be able to access the network share if the share doesn't 
>>require you to authenticate to access it (i.e., it allows ac
>>"Everyone" per the Sharing settings).
>>
> 
> The target (sharing) machine has Windows XP, and I have not yet found
> how to change the share permission to "everyone". I remember that in
> previous Windows versions, but Microsoft seems to have moved options
> all around, and just this straight forward task seems complicated now.

I have XP Pro and don't have a problem with this.  Do you have Home or 
Pro?  In Pro, I just bring up Sharing and Security for the folder, go 
into permissions, click the button to add a user, then type "Everyone".

I have disabled simple file sharing on that machine, though.  Perhaps 
that's necessary?  See 
<http://support.microsoft.com/default.aspx?scid=kb;en-us;307874> for 
more info on that.

It may also be that the folder being shared needs to be in an NTFS 
partition.

> I have been able to log in on the target machine as Administrator, with
> the same password, and made the share again. On the server (source
> machine) I also tried to create a SYSTEM account since none is in the
> user account list, but it refuses to create it saying one already exists.
> In any of these cases, nothing works, and I'm still unable to access
> the network drive with 'cron'. 
> 
> On UNIX (cygwin) side, how can I tell 'cron' to execute with a different
> user than "Administrator"? Maybe this will work. How do I provide the
> password, then?

There may be a way to do it with cygrunsrv, but I normally do it with 
the Windows Services tool.  Just edit the existing service, go to the 
Log On tab, and the rest should be obvious.  You enter the password 
directly on that screen.



--
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/

  reply	other threads:[~2003-09-09 19:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-02 14:48 Louis-Luc Le Guerrier
2003-09-03  4:16 ` David Rothenberger
2003-09-09 18:38   ` Louis-Luc Le Guerrier
2003-09-09 19:24     ` David Rothenberger [this message]
2003-09-09 19:43     ` Andrew DeFaria

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3F5E28F5.6070200@acm.org \
    --to=daveroth@acm.org \
    --cc=cygwin@cygwin.com \
    --cc=leguerri@IRO.UMontreal.CA \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).