This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: who is root? (or /usr/bin/sshd fails to start because of /var/log ownership)


On Tue, Mar 17, 2015 at 10:24 AM, Corinna Vinschen
<corinna-cygwin@cygwin.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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]