delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2014/11/05/13:24:34

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:from:to:subject:date:message-id:references
:in-reply-to:content-type:content-transfer-encoding
:mime-version; q=dns; s=default; b=MIdx+JueAk/ltmqNAJHwW7bvnXdmr
qAKJCiAVyKhIppvd+TFlSHgI7lO14H3BcrYb7uzJYGmlWwRCzC077w0ZLWg883u8
PP4CF3VDmp8OjnPCV4qDrOT4Mgrc4SwtRPInrEq1RdNlLKKltBNU6tjIwukdhv4L
XWptBbi6nv184A=
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:from:to:subject:date:message-id:references
:in-reply-to:content-type:content-transfer-encoding
:mime-version; s=default; bh=VYPjqvM8NLww0i/oYrs7AATT/n0=; b=fBJ
yblcFBjj7QiEC/69+PXw2nCH+X2evudGGwk/bII45KdyfhiNatbVXby5hxQ4g+oe
I1hO8erpqRHRrT81/uJANcI6mcx5EOHlylLxRnlZaXgRYzTJc/POqwqwlIPHv5Zi
FJxB2iEETTUk70p+1ipkAUsKJkT2KC2Oclk60ZaQ=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
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=-0.9 required=5.0 tests=AWL,BAYES_00,MIME_BASE64_BLANKS,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS autolearn=ham version=3.3.2
X-HELO: na01-bn1-obe.outbound.protection.outlook.com
From: "Habermann, David (D)" <DAHabermann AT dow DOT com>
To: "cygwin AT cygwin DOT com" <cygwin AT cygwin DOT com>
Subject: RE: [ANNOUNCEMENT] TEST RELEASE: Cygwin 1.7.33-0.5
Date: Wed, 5 Nov 2014 18:23:54 +0000
Message-ID: <C9D37D92E903B347A31B9CF82643BA280730A5ED@046-CH1MPN1-043.046d.mgd.msft.net>
References: <announce DOT 20141105111753 DOT GT28636 AT calimero DOT vinschen DOT de>
In-Reply-To: <announce.20141105111753.GT28636@calimero.vinschen.de>
MIME-Version: 1.0
X-OrganizationHeadersPreserved: 046-CH1MMR1-008.046d.mgd.msft.net
X-EOPAttributedMessage: 0
X-Forefront-Antispam-Report: CIP:65.52.44.158;CTRY:US;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(428002)(189002)(199003)(5423002)(46102003)(450100001)(110136001)(62966003)(107886001)(2501002)(106116001)(95666004)(105586002)(64706001)(20776003)(92726001)(47776003)(77156002)(92566001)(97736003)(2351001)(86362001)(31966008)(107046002)(81156004)(19580395003)(66066001)(77096003)(50466002)(101416001)(2656002)(87936001)(86146001)(22756005)(22746005)(21056001)(120916001)(84676001)(33656002)(76176999)(44976005)(6806004)(68736004)(69596002)(50986999)(106466001)(55846006)(551544002)(23676002)(4396001)(104016003)(54356999)(99396003)(79686002);DIR:OUT;SFP:1101;SCL:1;SRVR:BY2PR0101MB0869;H:mail.bsnconnect.com;FPR:;MLV:sfv;PTR:InfoDomainNonexistent;MX:1;A:1;LANG:en;
X-CrossPremisesHeadersPromoted: BL2FFO11FD035.protection.gbl
X-CrossPremisesHeadersFiltered: BL2FFO11FD035.protection.gbl
X-Microsoft-Antispam: UriScan:;UriScan:;
X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:;SRVR:BY2PR0101MB0869;
X-Forefront-PRVS: 0386B406AA
Received-SPF: None (protection.outlook.com: dow.com does not designate permitted sender hosts)
Authentication-Results: spf=none (sender IP is 65.52.44.158) smtp.mailfrom=DAHabermann AT dow DOT com;
X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:;SRVR:BY2PR0101MB0792;
X-OriginatorOrg: dow.com
X-IsSubscribed: yes
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id sA5IOTuj020523

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


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019