delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2008/12/31/11:15:23

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS
X-Spam-Check-By: sourceware.org
Message-ID: <495B9A28.3060904@cygwin.com>
Date: Wed, 31 Dec 2008 11:13:28 -0500
From: "Larry Hall (Cygwin)" <reply-to-list-only-lh AT cygwin DOT com>
Reply-To: cygwin AT cygwin DOT com
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.18) Gecko/20081120 Remi/2.0.0.18-1.fc8.remi Lightning/0.9 Thunderbird/2.0.0.18 Mnenhy/0.7.5.0
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: Mouting network drives from Cygwin ssh client
References: <5195c8760812300741g7057b16clf8aa59c30ce388e2 AT mail DOT gmail DOT com> <5195c8760812302132i53bda0fbwc068c00d61fc40f9 AT mail DOT gmail DOT com>
In-Reply-To: <5195c8760812302132i53bda0fbwc068c00d61fc40f9@mail.gmail.com>
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

Jeenu V wrote:
> Thanks for the link.
> 
> I removed the default CYGWIN sshd service and ran:
> 
> cygrunsrv --install sshd --path /usr/sbin/sshd.exe --user jeevis01
> --args '-D' --env 'CYGWIN="ntsec"
> 
> It asked for my password and installed successfully. However I
> couldn't start the service, and my /var/log/sshd.log was empty.
> 
> Later I tried starting sshd manually:
> $ /usr/sbin/sshd.exe
> /var/empty must be owned by root and not group or world-writable.
> 
> $ ls -ld /var/empty/
> drwxr-xr-x+ 2 SYSTEM Administrators 0 Dec 30 16:57 /var/empty/
> 
> $ chmod 700 /var/empty/
> $ ls -ld /var/empty/
> drwx------+ 2 SYSTEM Administrators 0 Dec 30 16:57 /var/empty/
> 
> $ /usr/sbin/sshd.exe
> /var/empty must be owned by root and not group or world-writable.
> 
> I think this is the reason why the server failed to start when I
> installed service in my name. Although I see many posts facing similar
> issues, problem gets solved after the chmod command. However, for me,
> it doesn't. Please help.

Yes, that is part of it.  Ownership/permissions of a collection of files
used by 'sshd' is highly scrutinized.  And, as you've found out, it's
not a one-step task to switch the service over from running as
SYSTEM (or 'sshd_server').  There are a number of files that get created
the first time 'sshd' runs (or when it's configured with
'/bin/ssh-host-config') that need to be adjusted if you change the user
that runs the service.  You can find the full list of files in
'/bin/ssh-host-config' but at least a partial list is:

   /etc/ssh*
   /var/empty
   /var/log/lastlog
   /var/log/sshd.log

Make sure these are all owned by the user that's now running 'sshd'.
That should help.  If not, take a look at '/bin/ssh-host-config' for
files I've missed.

-- 
Larry Hall                              http://www.rfk.com
RFK Partners, Inc.                      (508) 893-9779 - RFK Office
216 Dalton Rd.                          (508) 893-9889 - FAX
Holliston, MA 01746

_____________________________________________________________________

A: Yes.
 > Q: Are you sure?
 >> A: Because it reverses the logical flow of conversation.
 >>> Q: Why is top posting annoying in email?

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