[rancid] Cisco ACS 5.5

heasley heas at shrubbery.net
Thu May 1 20:56:45 UTC 2014


Wed, Apr 30, 2014 at 09:13:28AM +0200, Pawe?? Rzepa:
> Hi,
> No, it doesn't hang. When I login into the device interactively it
> works. When I run a command it produces unpredictable results, imho
> depending on the chunks of output retrieved from the device.
> 
> This is the excerpt from clogin -d -c 'write term' output which I
> suppose is relevant to the issue:
> 
> expect: does "ip domain-name my.company.com\r\n!        \r\nno ipv6
> enable\r\n!        \r\ninterface GigabitEthernet 0\r\n  ip address
> 10.10.10.10 255.255.255.0\r\n  ipv6 address autoconfig\r\n  no ipv6
> enable\r\n!        \r\ninterface GigabitEthernet 1\r\n  shutdown\r\n
> ipv6 address autoconfig\r\n  no ipv6 enable\r\n!        \r\nip
> name-server 10.10.10.10 10.10.10.10 \r\n!        \r\nip
> default-gateway 10.10.10.10\r\n!        \r\nclock timezone
> Europe/Warsaw\r\n!        \r\nntp server
> 10.10.10.10\r\n!\u0008\nusername root password hash
> $1$p4MxVbAdp$asdfasdfasdfasd role admin \r\n!\u0008\nno
> max-ssh-sessions\r\n!\u0008\n" (spawn_id exp6) match regular
> expression "\u0008+"? yes
> expect: set expect_out(0,string) "\u0008"
> expect: set expect_out(spawn_id) "exp6"
> expect: set expect_out(buffer) "ip domain-name my.company.com\r\n!
>    \r\nno ipv6 enable\r\n!        \r\ninterface GigabitEthernet 0\r\n
> ip address 10.10.10.10 255.255.255.0\r\n  ipv6 address autoconfig\r\n
> no ipv6 enable\r\n!        \r\ninterface GigabitEthernet 1\r\n
> shutdown\r\n  ipv6 address autoconfig\r\n  no ipv6 enable\r\n!
> \r\nip name-server 10.10.10.10 10.10.10.10 \r\n!        \r\nip
> default-gateway 10.10.10.10\r\n!        \r\nclock timezone
> Europe/Warsaw\r\n!        \r\nntp server 10.10.10.10\r\n!\u0008"
> expect: continuing expect

hrm, that does not work as intended.  this match has been there unchanged
since 2001.  would you try this patch with your asa?

Index: bin/clogin.in
===================================================================
--- bin/clogin.in	(revision 2828)
+++ bin/clogin.in	(working copy)
@@ -656,7 +656,7 @@
     for {set i 0} {$i < $num_commands} { incr i} {
 	send -- "[subst -nocommands [lindex $commands $i]]\r"
 	expect {
-	    -re "\b+"				{ exp_continue }
+	    -re "^\b+"				{ exp_continue }
 	    -re "^\[^\n\r *]*$reprompt"		{ send_user -- "$expect_out(buffer)"
 						}
 	    -re "^\[^\n\r]*$reprompt."		{ send_user -- "$expect_out(buffer)"



More information about the Rancid-discuss mailing list