Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <12b301c29b96$be03b970$1100a8c0@david1700> From: "David Brown" To: References: <11dc01c29b78$3bfe2f50$1100a8c0 AT david1700> <20021204093502 DOT GC1904 AT NBOF> <11ee01c29b7b$0de6d6f0$1100a8c0 AT david1700> <20021204125610 DOT GB460 AT NBOF> Subject: Re: Problems using sshd as a service Date: Wed, 4 Dec 2002 14:11:59 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-Priority: 3 X-MSMail-Priority: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 X-HotPOP: ----------------------------------------------- Sent By HotPOP.com FREE Email Get your FREE POP email at www.HotPOP.com ----------------------------------------------- > On Wed, Dec 04, 2002 at 10:53:52AM +0100, David Brown wrote: > > > On Wed, Dec 04, 2002 at 10:33:41AM +0100, David Brown wrote: > > > > I am trying to get sshd to run as a service on my W2K SP2 machine. I > > have > > > > got sshd set up properly (as far as I know), with all the keys and files > > it > > > > needs. If I start a cygwin bash shell and type "/usr/sbin/sshd", then > > the > > > > server starts fine and issues no errors or warnings. From another PC on > > the > > > > network, I can ssh in to this PC. In other words, sshd is working > > > > perfectly. > > > > > > > > However, when I install it as a service with > > > > > > > > cygrunsrv -I sshd -p /usr/sbin/sshd > > > > > > > > and then try to start the service, either with cygrunsrv or from the > > Control > > > > Panel, I get: > > > > > > > > cygrunsrv -S sshd > > > > cygrunsrv: Error starting a service: QueryServiceStatus: Win32 error > > 1062: > > > > The service has not been started. > > > > > > Are your mounts type system or user ? system should be better. > > > > > > > $ mount > > D:\cygwin\usr\X11R6\lib\X11\fonts on /usr/X11R6/lib/X11/fonts type system > > (binmode) > > D:\cygwin\bin on /usr/bin type system (binmode) > > D:\cygwin\lib on /usr/lib type system (binmode) > > D:\cygwin on / type system (binmode) > > c: on /cygdrive/c type user (binmode,noumount) > > d: on /cygdrive/d type user (binmode,noumount) > > e: on /cygdrive/e type user (binmode,noumount) > > m: on /cygdrive/m type user (binmode,noumount) > > p: on /cygdrive/p type user (binmode,noumount) > > q: on /cygdrive/q type user (binmode,noumount) > > > > So it looks like the basic cygwin mounts are system, but the mappings to > > windows drives are user. I presume sshd only access files through the basic > > mounts, so they should be ok. There is also no problem if I start sshd from > > the bash shell - perhaps this is something to do with the user that starts > > it, since services are owned/started by system? > > Maybe it's this, mounts seem to be o.k. > > > Gruss Olaf Föllinger > > P.S.: Please answer on the list so that other can read the answers too. > Sorry about that - I forgot to check the "reply-to" setting for this mailing list (most of the lists I use regularly have reply-to set to the list rather than the poster. I've just recently learned why many list administrators see that as a bad idea, and I agree with that - yet I *still* managed to forget it). It turns out that what I had to do was install the service with cygrunsrv -I sshd -p /usr/sbin/sshd -a "-D" I also changed ownership of /var/empty to SYSTEM, but I don't think that was the problem (since the directory was world writeable, and I also have been running without ntsec). I'm not too worried about security here, since the company's internal network is pretty well protected from the outside, and I know that if I can't figure things out, then there is no one else in our company who can! mvh. David -- 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/