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:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; q=dns; s=default; b=PcmIf2mXMsmEl3jF+G7st1Uz0eOZBpZFH3RKlzIkPqL LCVdgJjZWkS8/t56tT3s5FHvXt960g0efMRKWOTCM5jI64f1Jkt9f3vQ0UhG9kJ/ DFrUWIqLM08TYvP5W52Yfp8XB4jyEGR7yuM+tSEmY54i4q/hArjHTsX96+2uBfgo = 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:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; s=default; bh=oYAZJIxo6NteNIeha+3N9yXgUIc=; b=gLgi9MaakJrfX+VdH q8ZDWnim27RQIedY5YECXHv5XnBWqUhdkz/gMhBOcFB4EYcF5XeFcIdQjwfA/H9m szJ7XrunVa5oawXC0Z5g5wd9bnMIBzmjIEEIvrcj6CvZBEgtx2DbD+40wlRPj2Tj Qy5Smt6fKEqT7lm87UD8rUQjig= 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 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 X-HELO: gproxy3-pub.mail.unifiedlayer.com X-Authority-Analysis: v=2.1 cv=e5mVF8Z/ c=1 sm=1 tr=0 a=4AG7SanD5BnOJqNXMRWnJw==:117 a=4AG7SanD5BnOJqNXMRWnJw==:17 a=cNaOj0WVAAAA:8 a=f5113yIGAAAA:8 a=tI1cYrknTlUA:10 a=kk7KXprCoXgA:10 a=KUg-WYIBNPwA:10 a=IkcTkHD0fZMA:10 a=zw-YTd1iAAAA:8 a=r-eHKZTen0MA:10 a=0ib7giJ4WH4A:10 a=Mz4FeSKpmGgweKNa5HQA:9 a=QEXdDO2ut3YA:10 Message-ID: <53FD1354.1080706@prager.ws> Date: Tue, 26 Aug 2014 19:08:04 -0400 From: Bernd Prager User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.0 MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: Windows 7 sshd can only login as cyg_server References: <53F6459F DOT 5060203 AT prager DOT ws> <20140822130626 DOT GK32314 AT calimero DOT vinschen DOT de> <53F77CAB DOT 4000800 AT cygwin DOT com> <20140822201933 DOT GN32314 AT calimero DOT vinschen DOT de> <53F7A865 DOT 6030801 AT cygwin DOT com> <20140822204402 DOT GP32314 AT calimero DOT vinschen DOT de> <53F7B515 DOT 8020704 AT cygwin DOT com> <20140825105139 DOT GE11052 AT calimero DOT vinschen DOT de> <20140825110043 DOT GF11052 AT calimero DOT vinschen DOT de> <53FB5B01 DOT 60203 AT cygwin DOT com> In-Reply-To: <53FB5B01.60203@cygwin.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Identified-User: {1020:box307.bluehost.com:pragerws:prager.ws} {sentby:smtp auth 108.30.198.10 authed with bernd AT prager DOT ws} X-IsSubscribed: yes On 8/25/14 11:49 AM, Larry Hall (Cygwin) wrote: > On 08/25/2014 07:00 AM, Corinna Vinschen wrote: >> On Aug 25 12:51, Corinna Vinschen wrote: >>> On Aug 22 17:24, Larry Hall (Cygwin) wrote: >>>> On 08/22/2014 04:44 PM, Corinna Vinschen wrote: >>>> >>>> >>>> I solved it: It turned out, that my Windows domain policy was updating local policies in a way, that the local cyg_server account lost his group membership to the group 'Administrators' every time I log into my Windows 7. I have to fix that every time before I start sshd. I wrote a little python script that does the whole thing. In case someone wants to reuse it, enjoy: #!/usr/bin/python # -*- coding utf-8 -*- import win32net import win32serviceutil user = "cyg_server" group = "Administrators" # make sure sshd user is in admin group data = [ {"domainandname" : user} ] mem, tot, res = win32net.NetLocalGroupGetMembers(None, group, 1) inGroup = False for item in mem: if (item['name']) == user: inGroup = True break if not inGroup: win32net.NetLocalGroupAddMembers(None, "Administrators", 3, data) # restart sshd win32serviceutil.RestartService("sshd") -- 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