delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2015/03/17/16:46:20

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:mime-version:in-reply-to:references:date
:message-id:subject:from:to:content-type; q=dns; s=default; b=R0
uOHFaydbVlaF7NIeDf8AjgXsWIKU9YtBknVNh/W8cVNXiIAb8OVlEEehGkx6q5aG
nyb7YWzkRAX4mSt9ucdx7oOnzX9UIiDbgJwForAB6DZ4BC7bjY4nexOeWfv6DiQU
2+7W3g93wltjd/WzPe5TBsfTEh4yRJk7O6uUwsLdk=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:mime-version:in-reply-to:references:date
:message-id:subject:from:to:content-type; s=default; bh=HXL51NHc
g59O02nt0iJKbDfGVMo=; b=SHpEcdKKqbUC4QwQGLaPKLqu85RNIPySkjn34dti
Vpz0EV22fiTE7DC2RNkoJ/OI8sUZtMSLWq9oD1zN3HxlQDG+QMk+F6k8iPgF+reD
Bmjbu/YPM/ODL8WiMTZ3Rdsu1NS2dgRDrJoFT+kkd6dyhLlzCApY/TkpmzRwzIn7
ZP0=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
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
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=1.2 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,KAM_FROM_URIBL_PCCC,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=no version=3.3.2
X-HELO: mail-yh0-f47.google.com
MIME-Version: 1.0
X-Received: by 10.170.127.150 with SMTP id t144mr51558147ykb.41.1426625156755; Tue, 17 Mar 2015 13:45:56 -0700 (PDT)
In-Reply-To: <20150317142451.GT6096@calimero.vinschen.de>
References: <CAO73BAC-bFgMwxfyz67RKuPEMdzT=XmNVWNcBS_FkfPfOG7Ntg AT mail DOT gmail DOT com> <20150317142451 DOT GT6096 AT calimero DOT vinschen DOT de>
Date: Tue, 17 Mar 2015 16:45:56 -0400
Message-ID: <CAO73BABUfbdCqQ9TWuTFX08Z+Wj50wxrwgNCuEhFgeov_7fr7A@mail.gmail.com>
Subject: Re: who is root? (or /usr/bin/sshd fails to start because of /var/log ownership)
From: Mirko Vukovic <mirko DOT vukovic AT gmail DOT com>
To: cygwin AT cygwin DOT com
X-IsSubscribed: yes

On Tue, Mar 17, 2015 at 10:24 AM, Corinna Vinschen
<corinna-cygwin AT cygwin DOT com> wrote:
> On Mar 17 10:10, Mirko Vukovic wrote:
>> Hello,
>>
>> A few weeks ago, sshd stopped working after a cygwin64 update.  I
>> reinstalled cygwin64 (because of the new user and password handling, I
>> figured that to be easiest).
>>
>> I still cannot get sshd to run.  I get an error message:
>> >/usr/sbin/sshd.exe -d
>> debug1: sshd version OpenSSH_6.7, OpenSSL 1.0.1k 8 Jan 2015
>> debug1: private host key: #0 type 1 RSA
>> debug1: private host key: #1 type 2 DSA
>> debug1: private host key: #2 type 3 ECDSA
>> debug1: private host key: #3 type 4 ED25519
>> /var/empty must be owned by root and not group or world-writable.
>>
>> Here is what /var/empty looks like (I obfuscated the machine name part)
>> >ls -lrd /var/empty
>> drw-------+ 1 XXXXXXXXXX+cyg_server Administrators 0 Feb 25 09:41 /var/empty/
>>
>> There is no root user on my machine.  Should I create it?
>
> No.  The "must be owned by root" in sshd is the original upstream error
> message.  The test leading to the message on the other hand is tweaked
> for Cygwin to test if the /var/empty file is owned by the user running
> sshd.  So, if you run sshd from the command line, it refuses to run if
> /var/empty isn't owned by your current user account.  If you're running
> sshd as service from the XXXXXXXXXX+cyg_server account, /var/empty must
> be owned by the XXXXXXXXXX+cyg_server account.
>
> Does that help?
>
>
> Corinna
>
> --
> Corinna Vinschen                  Please, send mails regarding Cygwin to
> Cygwin Maintainer                 cygwin AT cygwin DOT com
> Red Hat

(Good news, bad news)

Good news: I can start sshd as a user, and ssh to localhost.

In bash ran as administrator:
- >chown myself /var/empty
- >/usr/bin/sshd -d

In another bash:
->ssh localhost.
works

Bad news:

sshd cannot start as service (after I revert the /var/empty/ ownership
as before).

I start it manually under windows services, it starts and then stops.
So it seems that it does log in.
In /var/log/sshd.log, I see again:
/var/empty must be owned by root and not group or world-writable

I do not see a login failure in the event manager.

When I look in services, sshd is set to log in as a Local System
Account.  Changing to
.\cyg_server does not help.  I don't want to bore you with the
details, in case I am going
the wrong way, but should sshd log in as a local service (the initial
setting), cyg_server, or sshd?

(I set the parameters to sshd to -d in the services, but I did not see
any output in sshd.log).

Thank you

Mirko

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019