delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/05/26/18:15:33

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Reply-To: Cygwin List <cygwin AT cygwin DOT com>
Message-Id: <6.1.0.6.0.20040526175321.032144f0@pop.theworld.com>
X-Sender:
Date: Wed, 26 May 2004 18:09:40 -0400
To: "Mike Kenny - BCX - Mngd Services" <Mike DOT Kenny AT bcx DOT co DOT za>,
"Cygwin (E-mail)" <cygwin AT cygwin DOT com>
From: Larry Hall <cygwin-lh AT cygwin DOT com>
Subject: Re: cron problem with authentication
In-Reply-To: <A2AE62FF85AEAC4BA3DE695E3C237D110AD47B@exmid04.africa.ente rprise.root>
References: <A2AE62FF85AEAC4BA3DE695E3C237D110AD47B AT exmid04 DOT africa DOT enterprise DOT root>
Mime-Version: 1.0

At 03:52 AM 5/26/2004, you wrote:
>I previously posted a problem where a job failed attaching to an MQ
>Q Manager when run from cron. The explanation that was provided 
>was that because MQ authenticates the user using the NT services 
>and cron had had to su to that user, bypassing these services, that
>the user running the job did not then have the correct credentials.
>
>This sounds plausible and certainly explains the behaviour I see, but
>what would be involved in cron checking to see under which user the
>cygwin session is running and if this is the same user as the cygwin
>cron service is running under. If they are the same then do not do
>the change of user? Would this enable the cron job to run with the
>correct credentials? Or am I totally misunderstanding the problem?
>I admit that I know little or nothing about either Windows security
>or how cygwin interacts with it.
>
>Thanks for any comments on this


In the default installation, the user doing the "su" (as you refer to it)
is the SYSTEM user.  The SYSTEM user has no access to remote SMB shares.
So your idea doesn't work because it assumes something that isn't true.

One possible alternative is to run cron as the user you want to run jobs 
as.  I don't recall, off-the-top-of-my-head, whether cron assumes that
it will run as SYSTEM and, if so, this approach probably wouldn't work
without changing the code.  Another alternative might be to use a service
which allows accessing remote directories without requiring Windows 
authentication (i.e. not SMB).


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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019