Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Message-ID: <3E970DAB.CB1DDEDE@ieee.org>
Date: Fri, 11 Apr 2003 14:47:07 -0400
From: "Pierre A. Humblet" <Pierre.Humblet@ieee.org>
X-Accept-Language: en,pdf
MIME-Version: 1.0
To: tim.gunter@bioscrypt.com
CC: cygwin@cygwin.com
Subject: Re: cron + network share(w/ full access?)
References: <20030411014720.GA4240@TGUN> <20030411015650.GA35059733@hpn5170x> <20030411180224.GA1712@TGUN>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Tim Gunter wrote:
> 
> On Thu, Apr 10, 2003 at 09:56:50PM -0400, Pierre A. Humblet wrote:
> > On Thu, Apr 10, 2003 at 06:47:20PM -0700, Tim Gunter wrote:
> > >
> > > 3) installing the cron service as a user that has access to
> > > the share. when i do this, cygrunsrv accepts the password that
> > > i give it, but when i start the service i get a "1069" failure
> > > to logon error. i'm pretty sure my passwd and group files are
> > > setup correctly as sshing to the cygwin machine works.
> > >
> > Does it have Logon As a Service privilege?
> >
> > Pierre
> 
> how do i set the Logon as a service privilege?

From the Windows User Manager GUI (on NT)

> yesterday, i tried setting the username and password with "cygrunsrv -I cron -p /usr/sbin/cron -u user -w password -a '-D' -e "CYGWIN=ntsec"", and that gave me the 1069 error.
> 
> today i tried changing the username and password in the windows services control panel.
> i am now getting a "1062" error and not a "1069" error. according to strace, it is now
> failing on a "seteuid32 uid: 18 myself->gid: 10513"
> 
> doesn't this mean that it has uid 18 which is the system? isn't windows supposed to
> be changing to the user account first and then starting the cron service? the following
> is more of the strace output:

Right. Looks like 18 is hardwired in cron.
So after you create that user and update the /etc/passwd file you would need to edit 
/etc/password and change the uid of the user to 18. With a little bit of luck
the setuid(18) will be a noop. 
Try keeping the SYSTEM uid to 18, too, for now. It's probably hardwired too. 
My head is spinning and I don't have the time to sort through all the implications.

> also why doesn't mounting the network share as system solve my problem?

Can you do that? Normally the network doesn't trust the local system.

> and how do i give the network share "full access" so that the system account can
> access it(i thought giving everyone full control in the sharing permissions dialog
> would accomplish this)?
 
Good questions.

Pierre

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

