X-Spam-Check-By: sourceware.org
To: cygwin@cygwin.com
From: Brian Kasper <bkasper@socal.rr.com>
Subject:  Re: "/bin/bash: permission denied" on WinXP 2003 x64 solved (privilege  problem)
Date:  Wed, 15 Aug 2007 05:08:20 -0700
Lines: 59
Message-ID: <f9uq7t$48j$1@sea.gmane.org>
References:  <f9p9if$rqb$1@sea.gmane.org> <20070813112930.GB17084@calimero.vinschen.de> <f9pgn4$kla$1@sea.gmane.org> <20070813122111.GV8535@calimero.vinschen.de> <f9pq47$nqg$1@sea.gmane.org> <f9r77v$2gi$1@sea.gmane.org>
Mime-Version:  1.0
Content-Type:  text/plain; charset=ISO-8859-1
Content-Transfer-Encoding:  7bit
User-Agent: Thunderbird 2.0.0.6 (Windows/20070728)
In-Reply-To: <f9r77v$2gi$1@sea.gmane.org>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

I wiped my sshd install based upon Corinna's instructions and re-ran
ssh-host-config.  Short answer:  it worked, and I didn't experience the
privilege problems with the sshd_server user.

For the sake of completeness, I'll include a slightly longer answer.

Here's the exact operating system I'm running:

Microsoft Windows XP
Professional x64 Edition
Version 2003
Service Pack 2

Here are the steps I took:

Stopped and removed the cygwin sshd service

	cygrunsrv -E sshd
	cygrunsrv -R sshd
	
Deleted the sshd_server user (I'm not using privilege separation, so
there was no sshd user to remove)

Removed the various sshd support files and directories:

	~ 505 $ rm /home/kasper/.ssh/known_hosts
	~ 506 $ rm -rf /var/empty
	~ 507 $ rm -rf /etc/ssh*

Ran ssh-host-config, answered all questions as I had previously (most
importantly, answering "yes" to "Should this script create a new local
account 'sshd_server' which has the required privileges?")

Ran "ssh localhost", which connected correctly, but oddly enough blocked
while it was parsing my .bash_profile.  I killed the session, exited
from all Cygwin shells, and stopped and restarted sshd.  After this,
"ssh localhost" worked (and works) like a charm.

Checked the rights assigned to sshd_server; they all appear to be there:

~ 501 $ editrights -u sshd_server -l
SeAssignPrimaryTokenPrivilege
SeCreateTokenPrivilege
SeTcbPrivilege
SeIncreaseQuotaPrivilege
SeServiceLogonRight
SeDenyInteractiveLogonRight
SeDenyNetworkLogonRight
SeDenyRemoteInteractiveLogonRight
~ 502 $

I'm not sure why it worked, but it does.  I performed at least one
update of Cygwin recently, so it's possible I have a newer version of
something.

Thanks again for the pointers and suggestions, folks.  Getting this
working will make my life much easier.

-B


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

