delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/03/01/11:40:55

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
MIME-Version: 1.0
Subject: RE: Problem running cygrunsrv with non SYSTEM accounts ($HOME problem?)
Date: Tue, 1 Mar 2005 10:40:30 -0600
Message-ID: <B1FAB0BF7755FC4597FBCFBDE66EA4A601848BB4@DCEVS1.tekelec.com>
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
From: "Aitken, Sean" <Sean DOT Aitken AT tekelec DOT com>
To: <cygwin AT cygwin DOT com>
X-OriginalArrivalTime: 01 Mar 2005 16:40:42.0308 (UTC) FILETIME=[6882E040:01C51E7D]
X-IsSubscribed: yes
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id j21Ges6i023997

See update below...

> I have been fighting a problem with trying to run SSHD on a Windows
> Server 2003 box. I have been able to narow the problem down a 
> bit. I did
> post earlier to day, but have stumbled across what appears to be a
> strong lead on the solution.
> 
> Facts:
> - With 'runas', I am able to start sshd with no problems using the
> 'sshd_server' account. I can even connect!
> - I have granted all local rights (RunAsService, Token,.. Etc.) These
> seemed to be configured already by the ssh-host-config program
> - Running the service under the local SYSTEM account produces 
> output in
> /var/log/sshd.log
> - Running the service under any other account produces NO log file!
> - Permissions against sshd and required Cygwin libs aren't a problem
> (since I could runas 'sshd_server' and it works fine)
> - When I invoke the sshd process with RunAs, it's after establishing a
> bash shell
> - Permissions in /var/log allow users to write (tested with runas)
> 
> With a little (actually a LOT) experimentation, it seems as though the
> 'sshd_server' user is having a hard time starting things up.  
> When I run
> as SYSTEM, I get output in the log folder..

I just found new info today that may help pinpoint the problem.  I did a
test using the same service account 'sshd_server'. I created a service
that ran cygcheck and ran the same using a login session.  The most
significant thing I found was a few of the environment variables were
different. Namely:

When run via a login session:
CYGWIN = `nontsec'
HOME = `C:\cygwin\var\empty'
MAKE_MODE = `unix'
PWD = `/var/empty'
USER = `sshd_server'

When run as a service (installed via. Cygrunsrv -I):
CYGWIN = `nontsec'
HOME = `C:\cygwin'

So, I see a couple things funny here:
- $HOME is wrong when logged in via cygrunsrv (It's set to /var/empty in
passwd)
- MAKE_MODE, PWD, and USER are missing!

So, if anyone has any suggestions for correcting the environment under
cygrunsrv, I would love to hear them! I have a hunch that this may be
the root cause of my problem! (aka. We'd love to get this working soon!)
:)

Best regards,
-Sean

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