public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Duncan Roe <duncan_roe@acslink.net.au>
To: cygwin@cygwin.com
Subject: Re: [ANNOUNCEMENT] TEST RELEASE: Cygwin 1.7.33-0.5
Date: Sat, 08 Nov 2014 07:22:00 -0000	[thread overview]
Message-ID: <20141108072230.GA3018@dimstar.local.net> (raw)
In-Reply-To: <C9D37D92E903B347A31B9CF82643BA280730A5ED@046-CH1MPN1-043.046d.mgd.msft.net>

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

      reply	other threads:[~2014-11-08  7:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-05 13:41 Corinna Vinschen
2014-11-05 18:24 ` Habermann, David (D)
2014-11-08  7:22   ` Duncan Roe [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20141108072230.GA3018@dimstar.local.net \
    --to=duncan_roe@acslink.net.au \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).