Messed up permissions on /var ?

Larry Hall (Cygwin) reply-to-list-only-lh@cygwin.com
Thu Aug 8 17:48:00 GMT 2013


On 8/8/2013 11:39 AM, David Lee Lambert wrote:
> I recently "migrated" a Cygwin instance from Windows XP to Windows 7
> (wanted to save a bit of external bandwidth versus running the
> installer again, also had a lot of custom stuff under /usr/local and
> so forth).  X works fine.  I can't get sshd to work (started as a
> daemon it would present a host key but not accept any password to log
> in),  and I suspect I may have made things worse trying to fix it.
>
> Trying to run the SSH daemon from a Cygwin command prompt started with
> "Run as administrator...",

Oh, please don't do that!  You can't just start 'sshd' from the command-line
from your ID (or as "administrator") the way you can on Linux/UNIX.
Unfortunately, this is a common misunderstanding when trying to debug
'sshd' problems on Windows.  But doing this sets permissions on files
and directories used by 'sshd' so that only your user can run it.  That
means you cannot run it as a service under the properly configured
'cyg_server' account, so pubkey authentication won't work.  As a
consolation, it's quite likely the permissions on the important files
and directories were already 'hosed' as a result of the copy.

Try these options, in order of relative ease, to try to recover:

   1. Run 'ssh-host-config' and 'ssh-user-config'.

   2. Remove users 'sshd' and 'cyg_server' from '/etc/passwd' and delete
      the sshd service (cygrunsrv -E sshd; cygrunsrv -R sshd).  Then
      run 'ssh-host-config' and 'ssh-user-config'.

   3. Install via 'setup*.exe' to a new location and then copy in the
      bits you want.  Use 'ssh-host-config' to configure 'sshd' and
      'ssh-user-config' to configure your user files.

-- 
Larry

_____________________________________________________________________

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

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



More information about the Cygwin mailing list