From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23344 invoked by alias); 8 Nov 2014 07:22:49 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 23331 invoked by uid 89); 8 Nov 2014 07:22:49 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 X-HELO: mail106.syd.optusnet.com.au Received: from mail106.syd.optusnet.com.au (HELO mail106.syd.optusnet.com.au) (211.29.132.42) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 08 Nov 2014 07:22:47 +0000 Received: from dimstar.local.net (c122-107-168-99.eburwd5.vic.optusnet.com.au [122.107.168.99]) by mail106.syd.optusnet.com.au (Postfix) with ESMTP id 8C0B53C5A46 for ; Sat, 8 Nov 2014 18:22:44 +1100 (AEDT) Received: (qmail 4101 invoked by uid 501); 8 Nov 2014 07:22:30 -0000 Date: Sat, 08 Nov 2014 07:22:00 -0000 From: Duncan Roe To: cygwin@cygwin.com Subject: Re: [ANNOUNCEMENT] TEST RELEASE: Cygwin 1.7.33-0.5 Message-ID: <20141108072230.GA3018@dimstar.local.net> Mail-Followup-To: cygwin@cygwin.com References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.22 (2013-10-16) X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=fvDlOjIf c=1 sm=1 tr=0 a=+cDhJlqnNvz9E7c5l3ERGg==:117 a=+cDhJlqnNvz9E7c5l3ERGg==:17 a=y26AOypDAAAA:8 a=PO7r1zJSAAAA:8 a=M1kyBYkWWGkA:10 a=kj9zAlcOel0A:10 a=iaFubHWvAAAA:8 a=bgj4ZmEcBQ8JDbKh-roA:9 a=CjuIK1q_8ugA:10 X-IsSubscribed: yes X-SW-Source: 2014-11/txt/msg00150.txt.bz2 On Wed, Nov 05, 2014 at 06:23:54PM +0000, Habermann, David (D) wrote: > > I just released a 5th TEST version of the next upcoming Cygwin release, > > 1.7.33-0.5. > > Ever since using this 1.7.33-0.x series (currently running 1.7.33-0.5) I've > been having intermittent trouble with one of my scripts, and just finally got > around to digging further today. This is an expect script (subroutine of a > larger system) designed to auto-login to an ssh session and then set the > passwd -R to allow further ssh sessions to have "full network powers". (I then > run a cron script which drops these rights off again every half-hour, so the > "full network powers" logins are time limited.) > > The symptoms of the failure are that it sometimes fails to send the ssh > password (and thus doesn't proceed to the passwd -R command at all). If I run > the script a second time, it almost always works on the second try. After some > time has passed I run it again and get a failure, then immediately run again > and succeed. I would appreciate any thoughts as to why such a script would > fail, and then succeed on successive runs. This routine basically never > failed on the previous recent versions of cygwin (in active daily use since > approximately July 1st). > > > > Dave > > > > > > The script is called like this: > > > > $ super.exp localhost mypasswd > > > > and the file super.exp looks like this: > > > #!/usr/bin/expect > > set mach [lindex $argv 0] > set pass [lindex $argv 1] > > spawn ssh -o PubkeyAuthentication=no $mach > expect -exact "password: " > send $pass\n > expect { > "$ " { > send "passwd -R\n" > expect -exact "password: " > send $pass\n > expect -exact "password: " > send $pass\n > expect -exact "$ " > send "exit\n" > interact > } > "Permission denied, please try again." { > send_error "The password you provided was invalid.\n" > exit 1 > } > } > I would try "set exp_internal 1" and capture the output somewhere. There shouldn't be too much for a script this size. You should see the exact failure point quite easily. Cheers ... Duncan. -- 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