[rancid] RANCID/clogin context-change FWSM/ASA

Jack O Regan jackoregan at gmail.com
Tue Nov 17 17:38:43 UTC 2015


Hi Lee,

I'm trying to get rancid to backup some virtual contexts too. Below is an
example of how my prompt changes on my ASA5525.

*FWL/admin/act# changeto context int-crp*
*FWL/int-crp/act# changeto context system*
*FWL/act#*

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

*    # Figure out the prompt.*
*    if { [regexp -- "(#| \\(enable\\))" $prompt_match junk] == 1 } {*
*        set enable 0*

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.

For example if the prompt changed to > we should insert it there.

*    # Figure out the prompt.*
*    if { [regexp -- "(>|#| \\(enable\\))" $prompt_match junk] == 1 } {*
*        set enable 0*

Sorry I can't be of anymore help.

Regards,
Jack







On Tue, Nov 17, 2015 at 3:51 PM, Lee Rian (CENSUS/TCO FED) <
lee.e.rian at census.gov> wrote:

> > What could be the problem here?
>
>
> RANCID looks for the prompt.  If it doesn't see it you get a timeout
>
>
> I'm going to guess the problem is the prompt is different in the system
> context.  I just tried it & got:
>
>
> asaname/admin> ena
> Password: ****************
> asaname/admin# changeto context system
> asaname#
>
>
> & no, sorry, I don't know how to deal with the prompt changing on you like
> that.
>
>
> Regards,
>
> Lee
>
>
>
>
> ------------------------------
> *From:* Rancid-discuss <rancid-discuss-bounces at shrubbery.net> on behalf
> of christian.filips at tu-dortmund.de <christian.filips at tu-dortmund.de>
> *Sent:* Tuesday, November 17, 2015 4:26 AM
> *To:* rancid-discuss at shrubbery.net
> *Subject:* [rancid] RANCID/clogin context-change FWSM/ASA
>
>
> Hello all!
>
>
>
> I have the problem to change the context after login into a Cisco FWSM.
>
> This is my clogin-command:
>
>
>
> =============
>
> rancid at host:$  /usr/lib/rancid/bin/clogin -c 'terminal pager 0; changeto
> context system;sh running-config;exit' asa-address
>
> asa-address
>
> spawn ssh -c 3des -x -l cisco_login asa-address
>
> login at asa-address's password:
>
> Type help or '?' for a list of available commands.
>
> asa-address/admin> enable
>
> Password:
>
> asa-address/admin#
>
> asa-address/admin# terminal length 0
>
>                        ^
>
> ERROR: % Invalid input detected at '^' marker.
>
> asa-address/admin# terminal width 132
>
>                         ^
>
> ERROR: % Invalid input detected at '^' marker.
>
> asa-address/admin#  terminal pager 0
>
> asa-address/admin#  changeto context system
>
>
>
> Error: TIMEOUT reached
>
> rancid at host:$
>
> =============
>
>
>
> The timeout appears at nearly 45 seconds.
>
> -
>
> I tried to find out something with the -d option, but it looks ok.
>
> I could mail, if useful, the output also.
>
> -
>
> I ran this on a ASA 5585, and it works fine there!
>
> Also for our Switches (without context-change ;-)).
>
> What could be the problem here?
>
>
>
> Thanks for help or new ideas!
>
> BR
>
> Christian
>
>
>
> *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. 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.
> 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. *
>
> _______________________________________________
> Rancid-discuss mailing list
> Rancid-discuss at shrubbery.net
> http://www.shrubbery.net/mailman/listinfo/rancid-discuss
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.shrubbery.net/pipermail/rancid-discuss/attachments/20151117/ea26f0cb/attachment.html>


More information about the Rancid-discuss mailing list