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: Mouting network drives from Cygwin ssh client


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/


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