<div dir="ltr">Hi Lee,<div><br></div><div>I'm trying to get rancid to backup some virtual contexts too. Below is an example of how my prompt changes on my ASA5525.<br><div><br></div><div><div><i>FWL/admin/act# changeto context int-crp</i></div><div><i>FWL/int-crp/act# changeto context system</i></div><div><i>FWL/act#</i></div></div><div><br></div><div>It always ends in a '#'. Is this the same for you ? I think this bit of code (from /usr/local/rancid/bin/clogin) detects the prompt</div><div><br></div><div><div><i> # Figure out the prompt.</i></div><div><i> if { [regexp -- "(#| \\(enable\\))" $prompt_match junk] == 1 } {</i></div><div><i> set enable 0</i></div></div><div><br></div><div>I think its looking for # or (enable) but I don't understand how it ignores what ever text comes before that. So it *should* work. Maybe it doesn't like the /'s being part of what comes before the #. I'm not sure how to investigate that.</div><div><br></div><div>For example if the prompt changed to > we should insert it there. </div><div><br></div><div><div><i> # Figure out the prompt.</i></div><div><i> if { [regexp -- "(>|#| \\(enable\\))" $prompt_match junk] == 1 } {</i></div><div><i> set enable 0</i></div></div><div><br></div><div>Sorry I can't be of anymore help.</div><div><br></div><div>Regards,<br>Jack</div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Nov 17, 2015 at 3:51 PM, Lee Rian (CENSUS/TCO FED) <span dir="ltr"><<a href="mailto:lee.e.rian@census.gov" target="_blank">lee.e.rian@census.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">
<div style="font-size:12pt;color:#000000;background-color:#ffffff;font-family:'Times New Roman',Times,serif"><span class="">
<p>> What could be the problem here? </p>
<p><br>
</p>
</span><p>RANCID looks for the prompt. If it doesn't see it you get a timeout</p>
<p><br>
</p>
<p>I'm going to guess the problem is the prompt is different in the system context. I just tried it & got:</p>
<p><br>
</p>
asaname/admin> ena<br>
Password: ****************<br>
asaname/admin# changeto context system<br>
asaname#<br>
<br>
<br>
<p>& no, sorry, I don't know how to deal with the prompt changing on you like that.</p>
<p><br>
</p>
<p>Regards,</p>
<p>Lee</p>
<p><br>
</p>
<p><br>
</p>
<br>
<div style="color:rgb(0,0,0)">
<hr style="display:inline-block;width:98%">
<div dir="ltr"><font style="font-size:11pt" color="#000000" face="Calibri, sans-serif"><b>From:</b> Rancid-discuss <<a href="mailto:rancid-discuss-bounces@shrubbery.net" target="_blank">rancid-discuss-bounces@shrubbery.net</a>> on behalf of <a href="mailto:christian.filips@tu-dortmund.de" target="_blank">christian.filips@tu-dortmund.de</a> <<a href="mailto:christian.filips@tu-dortmund.de" target="_blank">christian.filips@tu-dortmund.de</a>><br>
<b>Sent:</b> Tuesday, November 17, 2015 4:26 AM<br>
<b>To:</b> <a href="mailto:rancid-discuss@shrubbery.net" target="_blank">rancid-discuss@shrubbery.net</a><br>
<b>Subject:</b> [rancid] RANCID/clogin context-change FWSM/ASA</font>
<div> </div>
</div><div><div class="h5">
<div>
<div>
<p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:"Calibri",sans-serif">
Hello all!</p>
<p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:"Calibri",sans-serif">
</p>
<p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:"Calibri",sans-serif">
I have the problem to change the context after login into a Cisco FWSM.</p>
<p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:"Calibri",sans-serif">
This is my clogin-command:</p>
<p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:"Calibri",sans-serif">
</p>
<p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:"Calibri",sans-serif">
=============</p>
<p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:"Calibri",sans-serif">
rancid@host:$ /usr/lib/rancid/bin/clogin -c 'terminal pager 0; changeto context system;sh running-config;exit' asa-address</p>
<p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:"Calibri",sans-serif">
asa-address</p>
<p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:"Calibri",sans-serif">
spawn ssh -c 3des -x -l cisco_login asa-address</p>
<p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:"Calibri",sans-serif">
login@asa-address's password:</p>
<p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:"Calibri",sans-serif">
Type help or '?' for a list of available commands.</p>
<p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:"Calibri",sans-serif">
asa-address/admin> enable</p>
<p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:"Calibri",sans-serif">
Password:</p>
<p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:"Calibri",sans-serif">
asa-address/admin#</p>
<p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:"Calibri",sans-serif">
asa-address/admin# terminal length 0</p>
<p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:"Calibri",sans-serif">
^</p>
<p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:"Calibri",sans-serif">
ERROR: % Invalid input detected at '^' marker.</p>
<p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:"Calibri",sans-serif">
asa-address/admin# terminal width 132</p>
<p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:"Calibri",sans-serif">
^</p>
<p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:"Calibri",sans-serif">
ERROR: % Invalid input detected at '^' marker.</p>
<p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:"Calibri",sans-serif">
asa-address/admin# terminal pager 0</p>
<p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:"Calibri",sans-serif">
asa-address/admin# changeto context system</p>
<p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:"Calibri",sans-serif">
</p>
<p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:"Calibri",sans-serif">
Error: TIMEOUT reached</p>
<p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:"Calibri",sans-serif">
rancid@host:$</p>
<p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:"Calibri",sans-serif">
=============</p>
<p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:"Calibri",sans-serif">
</p>
<p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:"Calibri",sans-serif">
The timeout appears at nearly 45 seconds.</p>
<p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:"Calibri",sans-serif">
-</p>
<p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:"Calibri",sans-serif">
I tried to find out something with the -d option, but it looks ok.</p>
<p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:"Calibri",sans-serif">
I could mail, if useful, the output also.</p>
<p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:"Calibri",sans-serif">
-</p>
<p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:"Calibri",sans-serif">
I ran this on a ASA 5585, and it works fine there! </p>
<p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:"Calibri",sans-serif">
Also for our Switches (without context-change ;-)).</p>
<p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:"Calibri",sans-serif">
What could be the problem here? </p>
<p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:"Calibri",sans-serif">
</p>
<p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:"Calibri",sans-serif">
Thanks for help or new ideas!</p>
<p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:"Calibri",sans-serif">
BR</p>
<p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:"Calibri",sans-serif">
Christian</p>
</div>
<font face="Arial"><font size="2"><em>Wichtiger Hinweis: Die Information in dieser E-Mail ist vertraulich. Sie ist ausschließlich für den Adressaten bestimmt. Sollten Sie nicht der für diese E-Mail bestimmte Adressat sein, unterrichten Sie bitte den Absender
und vernichten Sie diese Mail. Vielen Dank. <br>
Unbeschadet der Korrespondenz per E-Mail, sind unsere Erklärungen ausschließlich final rechtsverbindlich, wenn sie in herkömmlicher Schriftform (mit eigenhändiger Unterschrift) oder durch Übermittlung eines solchen Schriftstücks per Telefax erfolgen.
<br>
<br>
Important note: The information included in this e-mail is confidential. It is solely intended for the recipient. If you are not the intended recipient of this e-mail please contact the sender and delete this message. Thank you. Without prejudice of e-mail
correspondence, our statements are only legally binding when they are made in the conventional written form (with personal signature) or when such documents are sent by fax.
</em></font></font></div>
</div></div></div>
</div>
</div>
<br>_______________________________________________<br>
Rancid-discuss mailing list<br>
<a href="mailto:Rancid-discuss@shrubbery.net">Rancid-discuss@shrubbery.net</a><br>
<a href="http://www.shrubbery.net/mailman/listinfo/rancid-discuss" rel="noreferrer" target="_blank">http://www.shrubbery.net/mailman/listinfo/rancid-discuss</a><br></blockquote></div><br></div>