Jan Dahl | 24 Dec 22:46 2013
Picon

Re: [rancid] #' in my login banner

I’ll try it out after the holidays and the ensuing fires that need to put out. Thanks! :)

Kind regards,
Jan 

> Date: Tue, 24 Dec 2013 06:59:47 +0000
> From: heasley <heas <at> shrubbery.net>
> To: Alan McKinnon <alan.mckinnon <at> gmail.com>
> Cc: rancid-discuss <at> shrubbery.net
> Subject: Re: [rancid] #' in my login banner
> Message-ID: <20131224065947.GC12140 <at> shrubbery.net>
> Content-Type: text/plain; charset=iso-8859-1
> 
> Thu, Dec 19, 2013 at 11:48:57AM +0200, Alan McKinnon:
>> One possibility is to ignore any line with 2 or more #, and assume that
>> it's a banner. This is the command case.
>> 
>> Login and command prompts contain ">" or "#", but always only one.
>> 
>> This way, code can discard lines that are known to NOT be the prompt.
>> It's not 100% failproof but it is an improvement over the blind match we
>> currently have.
>> 
>> 
>> On 19/12/2013 10:26, Jan Dahl wrote:
>>> Maybe if we could somehow define an "ignored" string? I have a couple
>>> of thousand switches with this in the login banner, which I won't be
>>> allowed to change any time soon:
>>> 
>>>                  ######    ######   #     #
(Continue reading)

heasley | 24 Dec 07:59 2013
Picon

Re: [rancid] #' in my login banner

Thu, Dec 19, 2013 at 11:48:57AM +0200, Alan McKinnon:
> One possibility is to ignore any line with 2 or more #, and assume that
> it's a banner. This is the command case.
> 
> Login and command prompts contain ">" or "#", but always only one.
> 
> This way, code can discard lines that are known to NOT be the prompt.
> It's not 100% failproof but it is an improvement over the blind match we
> currently have.
> 
> 
> On 19/12/2013 10:26, Jan Dahl wrote:
> > Maybe if we could somehow define an "ignored" string? I have a couple
> > of thousand switches with this in the login banner, which I won't be
> > allowed to change any time soon:
> > 
> >                   ######    ######   #     #
> >                   #     #   #        #     #
> >                   #     #   ######    #   #
> >                   #     #        #     # #
> >                   ######    ######      #
> > 
> > Is it un-clever? Indeed! But it has been rolled out world wide before
> > I started here and now I can't use rancid.
> > 
> > The really weird thing for me is that somehow, terminal length and
> > width are set at the right time, but none of my commands are pushed
> > after that.
> > 
> > Kind regards,
(Continue reading)

Sun | 23 Dec 15:47 2013
Picon

[rancid] rancid takes linux user default

I telnet from a linux machine with user linuxuser (linux username) 

rancid takes that linux user as login user to router(host1) not what is given in file.. how ?, only this router behave like this other are using user name from file only. 

/usr/local/rancid/bin/clogin host1
host1
spawn telnet host1
Trying host1
Connected to host1
Escape character is '^]'.


User Access Verification

Username: linuxuser
Password:

though I put different user in configuration file 

why so any idea guys ? 

_______________________________________________
Rancid-discuss mailing list
Rancid-discuss <at> shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
Ed Ravin | 20 Dec 03:43 2013
Picon

[rancid] Bluecoats

Every now and then in the last few years I see a note on the list from
someone who talks about trying to get RANCID working with Bluecoat proxies.
Can anyone report any successes, and better yet, share their working code?
_______________________________________________
Rancid-discuss mailing list
Rancid-discuss <at> shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss

Daniel Schmidt | 19 Dec 20:10 2013

[rancid] Brocade uptime

#* <at> & code update. 

- !Switch Fabric Module 1 Up Time is 1 days 18 hours 54 minutes 55 seconds
+ !Switch Fabric Module 1 Up Time is 2 days 18 hours 56 minutes 5 seconds

I'm sure somebody has already seen this and patched it - please share diff - many thanks. 
E-Mail to and from me, in connection with the transaction of public business, is subject to the Wyoming Public Records Act and may be disclosed to third parties.
_______________________________________________
Rancid-discuss mailing list
Rancid-discuss <at> shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
Jan Dahl | 19 Dec 09:26 2013
Picon

[rancid] #' in my login banner

Maybe if we could somehow define an "ignored" string? I have a couple
of thousand switches with this in the login banner, which I won't be
allowed to change any time soon:

                  ######    ######   #     #
                  #     #   #        #     #
                  #     #   ######    #   #
                  #     #        #     # #
                  ######    ######      #

Is it un-clever? Indeed! But it has been rolled out world wide before
I started here and now I can't use rancid.

The really weird thing for me is that somehow, terminal length and
width are set at the right time, but none of my commands are pushed
after that.

Kind regards,

Jan

On Wed Dec 11 18:24:32 UTC 2013, Allan McKinnon wrote:

On 11/12/2013 20:14, Per-Olof Olsson wrote:
> Hello
>
>
>
>
> On 12/11/2013 06:51 PM, Alan McKinnon wrote:
>> I see no-one has responded with an answer to your question.
>>
>> I think the reason is that code cannot deal with ">" and "#" characters
>> in a banner in any sane way that gives consistent results. For rancid to
>> function properly, it has to know what the shell prompt is exactly for a
>> given device, and to do that it has to parse the entire text output.
>>
>> The only tool available to detect the prompt is pattern matching which
>> inevitably means a regex. As a perl regex this is
>>
>> ^[-a-zA-Z0-9]*[>#]
>>
>> and that's assuming the prompt is the hostname.
>
> In hlogin I added
>
> -re "\[#>]+.*\[\n\r]+" {
> exp_continue
> }
>
> to just pass over none prompter # and >.
> Banner "#" and ">" is followed by CR or NL!

Only if the banner has a surrounding box made of > or #

One can always come up with a scheme that just happens to work for
oneself because local rules specify some exact format where you can get
a regex to work for you.

That's a lot of work though. I find it easier to just change the banner.

>
> Works for HPs
>
> /Peo
> ----------------------------------------------------------
> Per-Olof Olsson               Email: peo at chalmers.se
> Chalmers tekniska högskola    IT-service
> Hörsalsvägen 5                412 96 Göteborg
> Tel: 031/772 6738  Fax: 031/772 8660
> ----------------------------------------------------------
> _______________________________________________
> Rancid-discuss mailing list
> Rancid-discuss at shrubbery.net
> http://www.shrubbery.net/mailman/listinfo/rancid-discuss
>
>

--

-- 
Alan McKinnon
alan.mckinnon at gmail.com
_______________________________________________
Rancid-discuss mailing list
Rancid-discuss <at> shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss

Adam Stirk | 18 Dec 18:32 2013
Picon

[rancid] Palo Alto Configuration Backup

HI,

 

We’ve just start using RANCID to backup our Palo Alto firewalls using the contributed scripts. Now we have these backups we are trying to test them, which I’m having problems with as the backups don’t seem to be in the correct format.

 

Has anyone else tried to use these backups to restore a device?

 

Thanks

 

Adam

_______________________________________________
Rancid-discuss mailing list
Rancid-discuss <at> shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
Peter Jackson | 18 Dec 17:49 2013
Picon

[rancid] Fwd: Only Run Config

Sending to rancid-discuss <at> shrubbery.net.  The original was sent (or showed up in my email) as rancid-discuss <at> googlegroups.com.  When I replied to all, I got a return email with the following:

"We're writing to let you know that the group you tried to contact (rancid-discuss) may not exist, or you may not have permission to post messages to the group. A few more details on why you weren't able to post:

 * You might have spelled or formatted the group name incorrectly.
 * The owner of the group may have removed this group.
 * You may need to join the group before receiving permission to post.
 * This group may not be open to posting.

If you have questions related to this or any other Google Group, visit the Help Center at http://groups.google.com/support/."

---------- Forwarded message ----------
From: Peter Jackson <peterjackson1610 <at> gmail.com>
Date: Wed, Dec 18, 2013 at 11:37 AM
Subject: Re: [rancid] Only Run Config
To: Sun <sun.ccna <at> gmail.com>
Cc: rancid-discuss <at> googlegroups.com


If you only want rancid to save the running configuration (for Cisco, one of the commands 'more system:running-config', 'show running-config view full', 'show running-config', or 'write term') then you would have to disable all of the other commands in the commandtable in the [x]rancid file.

Here are the first five lines of the commandtable in the rancid file with the lines commented out (# at the beginning of the line).

<at> commandtable = (
#        {'show version'                 => 'ShowVersion'},
#        {'show redundancy secondary'    => 'ShowRedundancy'},
#        {'show idprom backplane',       => 'ShowIDprom'},
#        {'show install active'          => 'ShowInstallActive'},
#        {'show env all'                 => 'ShowEnv'},

If you are using RANCID for devices other than 'standard' Cisco, then you would have to do the same for the other [x]rancid files (hrancid, nrancid, xrancid, etc).




On Wed, Dec 18, 2013 at 1:24 AM, Sun <sun.ccna <at> gmail.com> wrote:
hi,

Running it smoothly without any issue, only thing is I want "running conf" lines not other hardware/device/chassis etc info on top of file getting in Rancid how can I trim that .. any hint guys 

Rgds|Sun 

_______________________________________________
Rancid-discuss mailing list
Rancid-discuss <at> shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss


_______________________________________________
Rancid-discuss mailing list
Rancid-discuss <at> shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
Sun | 18 Dec 07:24 2013
Picon

[rancid] Only Run Config

hi,

Running it smoothly without any issue, only thing is I want "running conf" lines not other hardware/device/chassis etc info on top of file getting in Rancid how can I trim that .. any hint guys 

Rgds|Sun 
_______________________________________________
Rancid-discuss mailing list
Rancid-discuss <at> shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
Ryan Milton | 17 Dec 16:39 2013

[rancid] Device not contacted

Hi all (Alan),

 

Rancid has generally been running smooth as can be with my small deployment. I have just added two more Netscreen firewalls, to bring to a total of 6 Netscreen204s.

 

Only issue is that one of the new devices is being a pain with that dreaded “The following routers have not been successfully contacted for more than 4 hours.” Error.

 

All  devices have same login in the .clonginrc

 

All devices can be logged into manually using the nlogin script.

 

Log files only show:

Getting missed routers: round 1.

195.3.XXX.XXX: missed cmd(s): get conf

195.3.XXX.XXX: End of run not found

#

 

The router.db file is fine, and the FW has the correct login info. Any idea what might the issue be?

 

Regards,

Ryan Milton

MVS Network Manager

o: 201-447-1505 x124

c: 862-249-5230

www.mvsusa.com

 

 

_______________________________________________
Rancid-discuss mailing list
Rancid-discuss <at> shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
Max Vaillant | 17 Dec 01:51 2013

Re: [rancid] Help to add new command in rancid script

Hi, thanks for the helpful cdp routine. My perl skills are non-existent but it seems that the posted code has too many line breaks. 

Could I bother you for the code in text form?



Max Vaillant 
SENIOR NETWORK ENGINEER

415.590.8775 OFFICE
415.789.6298 MOBILE


Attachment (smime.p7s): application/pkcs7-signature, 5366 bytes
_______________________________________________
Rancid-discuss mailing list
Rancid-discuss <at> shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss

Gmane