delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT sources DOT redhat DOT com> |
List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
List-Post: | <mailto:cygwin AT sources DOT redhat DOT com> |
List-Help: | <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs> |
Sender: | cygwin-owner AT sources DOT redhat DOT com |
Delivered-To: | mailing list cygwin AT sources DOT redhat DOT com |
Date: | Fri, 21 Sep 2001 22:49:03 +0400 |
From: | egor duda <deo AT logos-m DOT ru> |
X-Mailer: | The Bat! (v1.53 RC/4) |
Reply-To: | egor duda <cygwin AT cygwin DOT com> |
Organization: | deo |
X-Priority: | 3 (Normal) |
Message-ID: | <518351608.20010921224903@logos-m.ru> |
To: | Troy Noble <troy DOT noble AT channelpoint DOT com> |
CC: | "'Upat54wo AT aol DOT com'" <Upat54wo AT aol DOT com>, cygwin AT cygwin DOT com |
Subject: | Re: Shell execution |
In-Reply-To: | <8F23E55D511AD5119A6800D0B76FDDE101A26A9A@cpex3.channelpoint.com> |
References: | <8F23E55D511AD5119A6800D0B76FDDE101A26A9A AT cpex3 DOT channelpoint DOT com> |
MIME-Version: | 1.0 |
Hi! Friday, 21 September, 2001 Troy Noble troy DOT noble AT channelpoint DOT com wrote: >>From /usr/doc/Cygwin/cron.README: TN> "On NT/W2K run cron under SYSTEM account TN> as service to use that feature. Note that you don't have access to TN> net shares in the child processes then." TN> Which means m: (and thus /cygdrive/m) TN> is likely not mapped when your cron job is running... TN> as you discovered. TN> Search the archives for similar discussions on this TN> subject. A search on Google for cygwin +cron +mount +username TN> should do the trick I'd imagine. TN> A nifty little trick I've learned... if you don't mind TN> storing your NT username and password in a plain text file TN> somewhere on your disk (like in your script): TN> /winnt/system32/net use m: '\\hostname\sharename' yourpassword TN> '/user:YOURDOMAIN\yourusername' TN> and later before your script exits TN> /winnt/system32/net use /d m: TN> The security hole that this opens up should be obvious to TN> the casual observer... but it is effective nonetheless. It works. In a way. Apart from gaping security hole there's another big problem with letters. Your script may just silently die before reaching '/winnt/system32/net use /d m:' line. In that case (at least on NT 4.0) you'll be left with exiting, but unaccessible, undeletable and unchangeable 'm:'. Next time your script won't be able to run at all. You'll need to restart your machine to get rid of it So, i strongly suggest using UNC everywhere where possible. Egor. mailto:deo AT logos-m DOT ru ICQ 5165414 FidoNet 2:5020/496.19 -- 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/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |