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:message-id:date:from:reply-to:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=kHyDKqZBNVUeDIPu 22kHryOEOQclv20znjxE53PEzQIDabjmmfXRRWMXp/F4BoDgDtBL26G40RRWwjAc pe2ci12l1u8+AOfengIvHERNqsAP7wbo3N1q4EQypK0CS8a9VYQ1kIeH0FyMTPSN YLipuqfZWgnAwZVGpf82ic/NOxM= 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:message-id:date:from:reply-to:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; s=default; bh=EDM/RnW9GhHCh300S8cB7M bb33Y=; b=G5TOFcMC6w5AqjNO680kF/ob1BM1kebxLvwbqnoVwoPoOfYfwugkdD jarNgZbPBovXICrnuWZLjcuh9sPGdXDOK6C3PAMx+tN42fYbH+X+Gt7rOCgUwDwe ZnTIYIPlDw38j/7zEIuco3QYtxq2e5OK5niBpHfBv4Y5gpsaNKYHc= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com X-Spam-SWARE-Status: No, score=1.3 required=5.0 tests=AWL,BAYES_50,KHOP_THREADED,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_NO,RCVD_IN_HOSTKARMA_YE,RDNS_NONE autolearn=no version=3.3.1 Message-id: <5203D9B9.9020407@cygwin.com> Date: Thu, 08 Aug 2013 13:47:37 -0400 From: "Larry Hall (Cygwin)" Reply-to: cygwin AT cygwin DOT com User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130620 Thunderbird/17.0.7 MIME-version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: Messed up permissions on /var ? References: In-reply-to: Content-type: text/plain; charset=ISO-8859-1; format=flowed Content-transfer-encoding: 7bit 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