delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/01/24/10:09:04

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/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
X-Authentication-Warning: slinky.cs.nyu.edu: pechtcha owned process doing -bs
Date: Sat, 24 Jan 2004 10:08:49 -0500 (EST)
From: Igor Pechtchanski <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: "Joseph E. Vornehm, Jr." <jvornehm AT hotmail DOT com>
cc: cygwin AT cygwin DOT com
Subject: Re: Fix for sshd service start failure problem
In-Reply-To: <4011E0A4.5070202@hotmail.com>
Message-ID: <Pine.GSO.4.56.0401241003000.16692@slinky.cs.nyu.edu>
References: <4011E0A4 DOT 5070202 AT hotmail DOT com>
MIME-Version: 1.0

On Fri, 23 Jan 2004, Joseph E. Vornehm, Jr. wrote:

> For what it's worth, I think I've found a fix to a problem posted in October
> of 2002 in this thread:
>
> http://www.cygwin.com/ml/cygwin/2002-10/msg00443.html
>
> Here's my version of the problem: After running ssh-host-config (and
> noticing two errors from chown about the system account), the sshd Windows
> service won't start, even though manually executing /usr/sbin/sshd works
> fine.  I'm running the current openssh package, 3.7.1p2-2, on WinXP.  All my
> other Cygwin packages are current (as of today).

FYI, your Cygwin packages are only as current as the mirror you use.
That's why we ask that all reports be accompanied by the output of
"cygcheck -svr" (<http://cygwin.com/problems.html>).  In this case, it's
probably unnecessary, since this is a success report and you did mention
the openssh version, so this is more for the archives to discourage a
flurry of "all my packages are current but don't work" reports from people
using stale mirrors.

> Here is the error message from sshd in the Windows application log
> (Event Viewer):
>
> sshd : PID 4320 : starting service `sshd' failed: execv: 1, Operation not
> permitted.
>
> The problem is that I didn't have the SYSTEM user listed in my /etc/passwd.
>   I noticed that ssh-host-config had some issues with some chown calls at
> the end of its run.  The application log message seems to come from the fact
> that the ownership is incorrect for the /var/empty directory (where sshd
> chroots to on startup, I gather).
>
> Here was the easiest fix for me:
>
> mypc$ mkpasswd -l | grep '^SYSTEM:' >> /etc/passwd
> mypc$ cygrunsrv -R sshd
> mypc$ rm /etc/ssh_host* /etc/ssh_config /etc/sshd_config
> mypc$ ssh-host-config
>
> By the way, don't forget to delete /var/run/sshd.pid, if it's still around.
>   (It shouldn't exist if sshd exits cleanly.)
>
> I have some fuzzy memory that putting the SYSTEM user in /etc/passwd used to
> be a security issue in Cygwin.  Just for safety, I removed the SYSTEM entry
> from /etc/passwd again after I had run ssh-host-config.  Would anyone else
> care to comment one way or the other?
>
> Please copy any replies to me directly, as I'm not subscribed to the list.
> Joe V.

AFAIK, there is no security issue with having SYSTEM in /etc/passwd (or,
rather, no more of a security issue than having Administrator there).
Since sshd actually runs as SYSTEM, not putting SYSTEM in /etc/passwd is
basically asking for trouble.
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha AT cs DOT nyu DOT edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor AT watson DOT ibm DOT com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster."  -- Patrick Naughton

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