[rancid] Re: cisco pix clogin timeout

Trey Valenta t at trey.net
Tue Nov 20 23:34:03 UTC 2007


On Thu, Oct 18, 2007 at 11:41:49AM -0500, Gregory W Zill wrote:
 I am trying to automatically login with a new rancid setup to a 6.3(5)
> pix whose prompt looks like 
> 	AbCdEf>
> 
> The login portion appears to work but enable never finishes and
> eventually times out even when I add "-t 100"
> 
> The clogin I use looks like
> 	clogin abcdef.clients.company.com
> 
> I can ssh manually to "abcdef.clients.company.com". The enable just
> turns the > into a #.

Hi Gregory,


I had a very similar problem that was a pain to resolve.  The expect scripts
had no trouble pulling from a pix in my office, but I couldn't reliably connect
to a Pix over links with high latencies (particularly connections from the US
to China). I never truly resolved the issue, but for some reason passwords with
multiple special characters seemed to give me the most trouble. Until I have
time to really investigate, I used the following workaround in clogin. I set
send_slow to {6 .1} and use "send -s" when sending the enable password.



---cut here------
$ diff -u  clogin ~rancid/bin/clogin
--- clogin      2007-09-17 13:14:55.000000000 -0700
+++ /usr/local/rancid/bin/clogin        2007-10-18 13:43:00.000000000 -0700
@@ -539,10 +539,11 @@
     global u_prompt e_prompt
     set in_proc 1
 
+set send_slow { 6 .1 }
     send "enable\r"
     expect {
        -re "$u_prompt" { send "$enauser\r"; exp_continue}
-       -re "$e_prompt" { send "$enapasswd\r"; exp_continue}
+       -re "$e_prompt" { send -s "$enapasswd\r"; exp_continue}
        "#"             { set prompt "#" }
        "(enable)"      { set prompt "> (enable) " }
        -re "(denied|Sorry|Incorrect)"  {
-----cut here---


-- 
<t(Trey)@(Valenta)trey.net> Seattle, Wash.
L is for Leo who swallowed some tacks.


More information about the Rancid-discuss mailing list